/* =========================================================
   ПРОЕКТЫ: список, направление, кейс — дополняет styles.css
   Логика раздела: сверху 4 кейса (как на главной),
   ниже 9 направлений-галерей без деления на кейсы.
   ========================================================= */
:root { --sky: #5aaef6; }

/* ---------- HERO СПИСКА ---------- */
.p-hero {
  container-type: inline-size;
  margin-top: 5px; display: flex; flex-direction: column; gap: 32px;
  padding: 32px 32px 36px; border-radius: var(--r-xl); background: var(--surface);
}
.p-hero__top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.p-hero__jump { display: flex; gap: 6px; }
.p-hero__jump a {
  height: 36px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 30px; background: var(--tile);
  font-weight: 600; font-size: 13.5px; letter-spacing: -.03em; transition: background-color .2s, color .2s;
}
.p-hero__jump a:hover { background: var(--black); color: #fff; }
.p-hero__title {
  font-family: var(--f-display); font-weight: 500;
  font-size: 21cqw; line-height: .8; letter-spacing: -.08em; margin-left: -.05em; padding-bottom: .1em;
  color: var(--black);
}
.p-hero__bottom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: end; }
.p-hero__lead { max-width: 600px; }
.p-hero__lead span { color: var(--ink-3); }
.p-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.p-stats li { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: var(--r-md); background: var(--tile); }
.p-stats b { font-weight: 600; font-size: clamp(28px, 2.6vw, 38px); line-height: 1; letter-spacing: -.06em; }
.p-stats span { font-size: 13px; line-height: 1.3; letter-spacing: -.02em; color: var(--ink-2); }

/* ---------- ЗАГОЛОВКИ СЕКЦИЙ ---------- */
.p-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.p-head__titles { display: flex; flex-direction: column; gap: 24px; max-width: 760px; }
.p-head__note { max-width: 380px; font-size: 15px; line-height: 1.45; letter-spacing: -.03em; color: var(--ink-2); }
.p-cases { max-width: none; margin: 0; }

/* ---------- НАПРАВЛЕНИЯ ---------- */
.dirs { padding: 50px 31px 31px; border-radius: var(--r-lg); background: var(--surface); }
.dir-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.dir {
  display: flex; flex-direction: column; gap: 4px; padding: 4px; border-radius: var(--r-md); background: var(--tile);
  transition: background-color .3s;
}
.dir:hover { background: var(--black); color: #fff; }
.dir__cover {
  position: relative; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden;
  display: flex; align-items: flex-end; padding: 18px;
}
.dir__cover.has-img { padding: 0; }
.dir__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.dir:hover .dir__cover img { transform: scale(1.05); }
.dir__cover--pink { background: var(--pink); color: #000; }
.dir__cover--lime { background: var(--lime); color: #000; }
.dir__cover--sky { background: var(--sky); color: #fff; }
.dir__cover--night { background: var(--night); color: #fff; }
.dir__mark { font-family: var(--f-display); font-weight: 600; font-size: clamp(34px, 3.4vw, 52px); line-height: .9; letter-spacing: -.06em; transition: transform .6s var(--ease); }
.dir:hover .dir__mark { transform: translateY(-6px); }
.dir__body { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 18px; }
.dir__top { display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 11.2px; text-transform: uppercase; letter-spacing: -.02em; color: var(--muted); }
.dir:hover .dir__top { color: rgba(255, 255, 255, .6); }
.dir__name { margin: 4px 0 0; font-family: var(--f-ui); font-weight: 600; font-size: clamp(22px, 1.9vw, 28px); line-height: 1.05; letter-spacing: -.05em; padding-right: 48px; }
.dir__short { font-size: 14px; line-height: 1.4; letter-spacing: -.03em; color: var(--ink-2); padding-right: 48px; }
.dir:hover .dir__short { color: rgba(255, 255, 255, .65); }
.dir__arrow {
  position: absolute; right: 16px; top: 40px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; color: #000; font-size: 18px;
  transition: background-color .3s, transform .4s var(--ease);
}
.dir:hover .dir__arrow { background: var(--lime); transform: translateX(3px); }

/* ---------- НАПРАВЛЕНИЕ: HERO ---------- */
.d-hero {
  container-type: inline-size;
  margin-top: 5px; display: flex; flex-direction: column; gap: 20px;
  padding: 28px 32px 36px; border-radius: var(--r-xl); background: var(--black); color: #fff;
}
.crumbs--light, .d-hero .crumbs { color: rgba(255, 255, 255, .55); }
.d-hero .crumbs a, .crumbs--light a { color: #fff; text-decoration-color: rgba(255, 255, 255, .3); }
.d-hero__en { margin-top: 36px; font-family: var(--f-mono); font-size: 13px; text-transform: uppercase; letter-spacing: -.02em; color: var(--pink); }
.d-hero__title {
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(56px, 11cqw, 170px); line-height: .9; letter-spacing: -.07em; margin-left: -.04em;
  text-wrap: balance;
}
.d-hero__bottom { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 40px; align-items: end; margin-top: 16px; }
.d-hero__text { color: rgba(255, 255, 255, .75); max-width: 640px; }
.d-hero__link { display: inline-block; margin-top: 16px; color: var(--lime); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.d-stat { justify-self: end; display: flex; flex-direction: column; gap: 6px; padding: 22px 24px; min-width: 240px; border-radius: var(--r-md); background: var(--lime); color: #000; }
.d-stat b { font-weight: 600; font-size: clamp(40px, 4.2vw, 60px); line-height: .95; letter-spacing: -.06em; }
.d-stat span { font-size: 14px; line-height: 1.3; letter-spacing: -.02em; max-width: 220px; }

/* переключатель направлений */
.dswitch-bar {
  position: sticky; top: calc(84px + env(safe-area-inset-top, 0px)); z-index: 30;
  margin-top: 4px; padding-block: 8px;
  background: linear-gradient(var(--page) 70%, transparent);
}
.dswitch-list { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.dswitch-list::-webkit-scrollbar { display: none; }
.dswitch {
  flex: none; height: 40px; padding: 0 16px; display: inline-flex; align-items: center; gap: 8px;
  border-radius: 30px; background: var(--surface); font-weight: 600; font-size: 14px; letter-spacing: -.03em; white-space: nowrap;
  transition: background-color .2s, color .2s;
}
.dswitch span { font-family: var(--f-mono); font-weight: 500; font-size: 11.5px; color: var(--muted); }
.dswitch:hover { background: #ececec; }
.dswitch.is-active { background: var(--black); color: #fff; }
.dswitch.is-active span { color: var(--lime); }

/* кейсы направления */
.d-cases { margin-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.d-cases__label { font-family: var(--f-mono); font-size: 12px; text-transform: uppercase; letter-spacing: -.02em; color: var(--muted); }
.d-cases__list { display: flex; gap: 4px; flex-wrap: wrap; }
.mini-case {
  display: flex; align-items: center; gap: 14px; padding: 6px 16px 6px 6px; border-radius: 16px; background: var(--surface);
  transition: background-color .25s, color .25s;
}
.mini-case img { width: 64px; height: 52px; object-fit: cover; border-radius: 11px; }
.mini-case__text { display: flex; flex-direction: column; gap: 2px; }
.mini-case__text b { font-weight: 600; font-size: 15px; letter-spacing: -.03em; }
.mini-case__text span { font-size: 13px; color: var(--ink-2); letter-spacing: -.02em; }
.mini-case__go { margin-left: 8px; font-size: 16px; }
.mini-case:hover { background: var(--lime); }

/* галерея направления */
.d-gallery { margin-top: 20px; }
.shot-wrap { position: relative; break-inside: avoid; }
.shot__case {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  height: 30px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 30px;
  background: var(--lime); color: #000; font-weight: 600; font-size: 12.5px; letter-spacing: -.03em;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .15); transition: transform .3s var(--ease);
}
.shot__case:hover { transform: translateY(-2px); }
.d-more-row { margin-top: 28px; }
.d-more-row .btn span { opacity: .6; margin-left: 4px; font-variant-numeric: tabular-nums; }
.d-empty {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  padding: 48px 40px; border-radius: var(--r-lg); background: var(--surface);
}
.d-empty__title { font-family: var(--f-display); font-weight: 600; font-size: clamp(28px, 2.6vw, 38px); letter-spacing: -.045em; }
.d-empty__text { max-width: 480px; color: var(--ink-2); font-size: 16px; line-height: 1.45; margin-bottom: 8px; }

/* видео */
.videos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.video {
  position: relative; aspect-ratio: 4 / 3; padding: 20px; border-radius: var(--r-md);
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 6px; text-align: left;
  overflow: hidden; transition: transform .4s var(--ease);
}
.video:hover { transform: translateY(-3px); }
.video--night { background: var(--night); color: #fff; }
.video--pink { background: var(--pink); color: #000; }
.video--lime { background: var(--lime); color: #000; }
.video--sky { background: var(--sky); color: #fff; }
.video__play {
  position: absolute; top: 18px; right: 18px; width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .9);
  transition: transform .35s var(--ease);
}
.video__play::after { content: ""; position: absolute; left: 18px; top: 14px; border-left: 14px solid #000; border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.video:hover .video__play { transform: scale(1.1); }
.video__name { font-family: var(--f-display); font-weight: 600; font-size: clamp(22px, 2vw, 30px); line-height: 1; letter-spacing: -.05em; }
.video__meta { font-family: var(--f-mono); font-size: 11.2px; text-transform: uppercase; letter-spacing: -.02em; opacity: .7; }

/* следующее направление */
.d-next {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap;
  padding: 36px 40px; border-radius: var(--r-lg); background: var(--surface);
  transition: background-color .3s, color .3s;
}
.d-next:hover { background: var(--lime); }
.d-next__label { font-family: var(--f-mono); font-size: 13px; text-transform: uppercase; color: var(--muted); }
.d-next:hover .d-next__label { color: rgba(0, 0, 0, .6); }
.d-next__name { font-family: var(--f-display); font-weight: 600; font-size: clamp(36px, 5vw, 72px); line-height: 1; letter-spacing: -.05em; }

/* =========================================================
   КЕЙС
   ========================================================= */
.c-cover {
  position: relative; overflow: hidden; margin-top: 5px;
  aspect-ratio: 1392 / 720; min-height: 460px; border-radius: var(--r-xl); background: #0a0a0a; color: #fff;
}
.c-cover__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: zoom 1.6s var(--ease) both; }
@keyframes zoom { from { transform: scale(1.06); } }
.c-cover__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, transparent 25%, transparent 50%, rgba(0, 0, 0, .65) 100%); }
.c-cover__top { position: absolute; left: 32px; right: 32px; top: 28px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.c-cover__idx { font-family: var(--f-mono); font-size: 13px; text-transform: uppercase; color: rgba(255, 255, 255, .8); }
.c-cover__text { position: absolute; left: 32px; right: 32px; bottom: 32px; }
.c-cover__client { font-family: var(--f-mono); font-size: 14.4px; text-transform: uppercase; color: var(--lime); }
.c-cover__title { margin-top: 10px; font-family: var(--f-display); font-weight: 600; font-size: clamp(40px, 6.4vw, 96px); line-height: .95; letter-spacing: -.055em; text-wrap: balance; max-width: 1000px; }

.c-info-wrap { margin-top: 4px; }
.c-info {
  display: grid; grid-template-columns: 325fr 977fr; gap: 24px;
  padding: 50px 32px 56px; border-radius: var(--r-lg); background: var(--surface);
}
.cfacts { margin: 0; display: flex; flex-direction: column; gap: 4px; align-self: start; }
.cfact { padding: 16px 18px; border-radius: 14px; background: var(--tile); }
.cfact dt { font-family: var(--f-mono); font-size: 11.2px; text-transform: uppercase; color: var(--muted); }
.cfact dd { margin: 4px 0 0; font-weight: 600; font-size: 16px; letter-spacing: -.03em; }
.cfact a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--pink); }
.c-lead { font-family: var(--f-display); font-weight: 500; font-size: clamp(24px, 2.2vw, 32px); line-height: 1.2; letter-spacing: -.035em; text-wrap: balance; max-width: 860px; }
.cblocks { margin-top: 48px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 48px; }
.cblock { padding-top: 20px; border-top: 1px solid #eaeaea; }
.cblock__h { font-family: var(--f-mono); font-weight: 500; font-size: 13px; text-transform: uppercase; letter-spacing: -.02em; color: var(--muted); }
.cblock__p { margin-top: 14px; font-size: 17px; line-height: 1.55; letter-spacing: -.02em; }

/* рендер vs фото */
.cmp-wrap { padding: 50px 36px 36px; border-radius: var(--r-lg); background: #000; color: #fff; }
.cmp-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.cmp-title { margin-top: 24px; }
.cmp-note { max-width: 320px; font-size: 15px; color: rgba(255, 255, 255, .6); }
.cmp { --pos: 50%; position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-md); overflow: hidden; background: #111; user-select: none; }
.cmp__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cmp__top { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.cmp__line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }
.cmp__line i {
  position: absolute; top: 50%; left: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
  background: var(--lime); box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
}
.cmp__line i::before { content: "‹ ›"; position: absolute; inset: 0; display: grid; place-items: center; color: #000; font-weight: 600; font-size: 18px; letter-spacing: 2px; }
.cmp__tag { top: 14px; }
.cmp__tag--l { left: 14px; }
.cmp__tag--r { left: auto; right: 14px; }
.cmp__range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.cmp__range:focus-visible + * , .cmp:focus-within .cmp__line i { outline: 2px solid #fff; outline-offset: 3px; }

/* галерея кейса */
.cgal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.cgal__item { aspect-ratio: 4 / 3; border-radius: var(--r-md); overflow: hidden; background: #e7e7e7; cursor: zoom-in; }
.cgal__item.is-wide { grid-column: 1 / -1; aspect-ratio: 16 / 8; }
.cgal__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.cgal__item:hover img { transform: scale(1.03); }

/* следующий кейс */
.c-next { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 4px; }
.c-next__img { aspect-ratio: 16 / 10; border-radius: var(--r-lg); overflow: hidden; background: #0a0a0a; }
.c-next__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.c-next:hover .c-next__img img { transform: scale(1.04); }
.c-next__body {
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 8px;
  padding: 36px; border-radius: var(--r-lg); background: var(--surface);
}
.c-next__label { font-family: var(--f-mono); font-size: 13px; text-transform: uppercase; color: var(--muted); margin-bottom: auto; }
.c-next__client { font-family: var(--f-mono); font-size: 14px; text-transform: uppercase; color: var(--ink); }
.c-next__title { font-family: var(--f-display); font-weight: 600; font-size: clamp(30px, 3.2vw, 46px); line-height: 1; letter-spacing: -.05em; text-wrap: balance; }
.c-next__btn { margin-top: 16px; }
.c-all { margin-top: 28px; }

/* ---------- АДАПТИВ ---------- */
@media (max-width: 1100px) {
  .dir-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .videos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .p-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .p-hero__bottom, .d-hero__bottom { grid-template-columns: 1fr; }
  .d-stat { justify-self: start; }
  .c-info { grid-template-columns: 1fr; padding: 36px 24px 40px; }
  .cfacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cblocks { grid-template-columns: 1fr; gap: 24px; }
  .c-next { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .p-hero, .d-hero { padding: 20px 20px 24px; }
  .p-hero__title { font-size: 24cqw; }
  .p-hero__jump { display: none; }
  .dirs { padding: 32px 12px 12px; }
  .dir-grid { grid-template-columns: 1fr; }
  .dswitch-bar { top: calc(72px + env(safe-area-inset-top, 0px)); }
  .videos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .video { padding: 14px; }
  .video__play { width: 36px; height: 36px; top: 12px; right: 12px; }
  .video__play::after { left: 14px; top: 10px; border-left-width: 11px; border-top-width: 8px; border-bottom-width: 8px; }
  .d-empty { padding: 32px 20px; }
  .d-next { padding: 28px 20px; }
  .c-cover { min-height: 420px; aspect-ratio: auto; height: 70vh; max-height: 560px; }
  .c-cover__top { left: 18px; right: 18px; top: 18px; }
  .c-cover__text { left: 18px; right: 18px; bottom: 20px; }
  .cmp-wrap { padding: 32px 14px 14px; }
  .cmp { aspect-ratio: 4 / 5; }
  .cgal { grid-template-columns: 1fr; }
  .cgal__item.is-wide { aspect-ratio: 4 / 3; }
  .c-next__body { padding: 24px 20px; }
}

/* видео в галерее направления */
.shot--video { cursor: default; }
.shot--video video { display: block; width: 100%; height: auto; border-radius: inherit; }
