/* ==========================================================================
   Портфолио. Тёмная шапка и подвал, светлое поле карусели:
   заголовки — PT Sans, подпись-призыв и мелкие подписи — тоже PT Sans,
   верхний регистр с разрядкой, плавное подчёркивание и приглушённые иконки.

   Примеры работ показаны каруселью в духе jords.co.uk: активный слайд
   по центру и в полном размере, соседние уменьшены (scale .9), за слайдами
   идут декоративные линии, ниже — кнопки-стрелки.
   Прокрутка бесконечная: после последнего слайда идёт первый (см. slider.js).
   Шапка и поле карусели — светло-серые (#e6e6e6), подвал тёмный, как на главной.
   Вся страница укладывается в один экран — вертикального скролла нет.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

/* страница укладывается в один экран: шапка — сверху, подвал — снизу,
   карусель занимает остаток высоты; вертикального скролла нет */
body {
  display: flex;
  flex-direction: column;
  height: 100vh;                          /* фолбэк */
  height: 100dvh;
  margin: 0;
  overflow: hidden;
  font-family: 'PT Sans', Helvetica, Arial, sans-serif;
  font-size: .8rem;
  font-weight: 400;
  line-height: 1.6;
  color: #222;
  background: #e6e6e6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

/* --------------------------- Шапка (тёмная) ----------------------------- */
.top {
  flex: none;
  padding: clamp(18px, 4vh, 34px) 15px clamp(12px, 2.4vh, 20px);
  text-align: center;
  background: #1d1d1d;                    /* та же тёмная, что и у подвала */
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.top-inner {
  max-width: 1000px;
  margin: 0 auto;
}
/* заголовок — он же ссылка на главную */
.top h1 a {
  display: inline-block;
  margin: .15rem 0 .55rem;
  font-family: 'PT Sans', Helvetica, Arial, sans-serif;
  font-size: clamp(1.15rem, 3.4vw, 2.05rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: .02em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
}
.top h1 { margin: 0; }
.top .sub {
  margin: 0;
  font-family: 'PT Sans', Helvetica, Arial, sans-serif;
  font-size: clamp(.68rem, 2.1vw, .95rem);
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .65);
}

/* ---------------------------- Секция работ ------------------------------ */
/* карусель занимает остаток высоты экрана между шапкой и подвалом */
.work {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  padding: clamp(8px, 1.8vh, 18px) 0;
  background: #e6e6e6;
}
.work-title {
  flex: none;
  margin: 0 0 clamp(8px, 1.8vh, 18px);
  padding: 0 15px;
  font-family: 'PT Sans', Helvetica, Arial, sans-serif;
  font-size: clamp(.95rem, 2.7vw, 1.5rem);
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-align: center;
  color: #222;
}

/* --------------------------- Карусель (слайдер) ------------------------- */
.slider {
  position: relative;
  flex: none;
  width: 100%;
  overflow: clip;                         /* слайды обрезаются по краям экрана */
}
/* линии за слайдами: видны в промежутках между карточками */
.slider-lines {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  z-index: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(13px, 2.8vh, 26px);
  transform: translateY(-50%);
  pointer-events: none;
}
.slider-line {
  display: block;
  width: 100%;
  height: 1px;
  background: rgba(0, 0, 0, .07);
  box-shadow: 0 .5px 1px 0 rgba(255, 255, 255, .8);
}

/* лента слайдов */
.slider-list {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  will-change: transform;
  touch-action: pan-y;                    /* горизонтальный свайп — наш, вертикальный — страницы */
  /* во время свайпа не выделяем текст и не тянем картинки */
  -webkit-user-select: none;
  user-select: none;
}
.slider:focus { outline: none; }
.slider:focus-visible { outline: 1px solid rgba(0, 0, 0, .4); outline-offset: 6px; }

.slider-slide {
  flex: none;
  /* ширину ограничивает и высота экрана: карточка целиком влезает без скролла */
  width: min(85vw, 60rem, calc((100vh - 470px) * 1.3333));
  width: min(85vw, 60rem, calc((100dvh - 470px) * 1.3333));
  margin: 0 clamp(6px, 1.4vw, 16px);
  transition: transform .4s cubic-bezier(.625, .05, 0, 1);
}
/* боковые слайды меньше активного — тот же приём, что на jords.co.uk */
.slider-slide:not(.is-active) { transform: scale(.9); }

/* тройная рамка карточки: frame → inner → изображение */
.slide-frame {
  display: block;
  padding: clamp(8px, 1vw, 12px);
  color: inherit;
  text-decoration: none;
  background: #f4f4f4;
  border: 1px solid rgba(0, 0, 0, .07);
  border-radius: clamp(1.1rem, 2.6vw, 2rem);
  box-shadow: 0 .25rem .375rem -.125rem rgba(0, 0, 0, .08);
  transition: border-color .3s ease, box-shadow .3s ease;
}
.slide-frame:hover,
.slide-frame:focus-visible {
  border-color: rgba(0, 0, 0, .16);
  box-shadow: 0 .9rem 1.6rem -.6rem rgba(0, 0, 0, .18);
}
.slide-frame:focus-visible { outline: none; }

.slide-inner {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: clamp(8px, 1vw, 12px);
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .05);
  border-radius: clamp(.9rem, 2vw, 1.5rem);
  box-shadow: 0 .25rem .375rem -.125rem rgba(0, 0, 0, .06);
}

.slide-img-wrap {
  position: relative;
  display: block;
  aspect-ratio: 9.12 / 6.84;              /* пропорция слайда на референсе */
  overflow: hidden;
  background: #dcdcdc;
  border: 1px solid rgba(0, 0, 0, .05);
  border-radius: clamp(.6rem, 1.4vw, 1rem);
}
.slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: top center;
  -webkit-user-drag: none;
  pointer-events: none;                   /* клик/свайп обрабатывает сама карточка */
}

/* подпись: название слева, метки справа — как portfolio_slide_content на референсе */
.slide-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .4rem 1.5rem;
  padding: 0 clamp(6px, .9vw, 12px) .2rem;
}
.slide-title {
  font-size: clamp(.86rem, 1.9vw, 1.1rem);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #222;
}
.slide-info-wrap {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .35rem clamp(.9rem, 2.4vw, 2.5rem);
}
.slide-info {
  font-family: 'PT Sans', Helvetica, Arial, sans-serif;
  font-size: .6rem;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(34, 34, 34, .5);
}

/* -------------------------- Кнопки-стрелки ----------------------------- */
.slider-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: clamp(8px, 1.8vh, 16px) 0 0;
}
.slider-btn {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: .72rem;
  color: #222;
  background: #f1f1f1;
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: .75rem;
  box-shadow:
    0 .5rem .75rem -.375rem rgba(0, 0, 0, .13),
    0 -.5rem .75rem -.375rem rgba(0, 0, 0, .08),
    inset 0 .125rem .25rem -.125rem rgba(0, 0, 0, .1),
    0 .0625rem .0625rem 0 #fff;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, color .25s ease, opacity .25s ease;
}
.slider-btn:hover {
  color: #000;
  box-shadow:
    0 .5rem 1rem .1rem rgba(0, 0, 0, .12),
    0 -.5rem .75rem -.375rem rgba(0, 0, 0, .08),
    inset 0 .125rem .6rem -.125rem rgba(0, 0, 0, .14),
    0 0 0 2px rgba(0, 0, 0, .06);
}
.slider-btn:active { transform: translateY(2px) scale(.95); }
/* кнопки не блокируются: прокрутка бесконечная */
.slider-btn[disabled] { opacity: .38; cursor: default; }
.slider-btn:focus-visible { outline: 1px solid rgba(0, 0, 0, .55); outline-offset: 3px; }
.slider-icon {
  flex: none;
  display: block;
  width: 100%;
  height: 100%;
}
.slider-btn:active .slider-icon { transform: scale(.96); }

/* --------------------------- Подвал --------------------------------- */
.footer {
  flex: none;
  padding: clamp(14px, 2.6vh, 26px) 15px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, .1);
  background: #1d1d1d;                    /* тёмный подвал, как на главной */
  color: #fff;
}
/* призыв перед иконками */
.footer-cta {
  margin: 0 0 .2rem;
  font-family: 'PT Sans', Helvetica, Arial, sans-serif;
  font-size: clamp(.72rem, 2.4vw, .95rem);
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .85);
}
/* стрелка вниз — указывает на иконки (инлайновый SVG-шеврон) */
.footer-arrow {
  display: block;
  width: 1.1rem;
  height: 1.1rem;
  margin: 0 0 .9rem;
  color: #fff;
  animation: arrow-hint 1.8s ease-in-out infinite;
}
@keyframes arrow-hint {
  0%, 100% { transform: translateY(0);     opacity: .45; }
  50%      { transform: translateY(6px);   opacity: 1; }
}
.footer .social-link {
  margin: 0 0 1.1rem;
  font-size: 0;
}
.footer .social-link a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  margin: 0 .35rem;
  line-height: 1;
  text-decoration: none;
  vertical-align: middle;
  color: #fff;
  opacity: .45;
  transition: opacity .3s ease, transform .3s ease;
}
.footer .social-link a:hover,
.footer .social-link a:focus {
  opacity: 1;
  transform: translateY(-2px);
  outline: none;
}
.footer .social-link img {
  display: block;
  height: 1.2rem;                         /* единая высота всех иконок */
  width: auto;
}

/* ----------------------------- Адаптивность ----------------------------- */
@media (max-width: 767px) {
  /* на узких экранах подпись слайда уходит в две строки */
  .slide-content {
    flex-direction: column;
    align-items: flex-start;
    gap: .4rem;
  }
  .slide-info-wrap { justify-content: flex-start; }
  /* на мобильных вокруг карточки меньше хрома — сужаем поправку высоты */
  .slider-slide {
    width: min(88vw, calc((100vh - 360px) * 1.3333));
    width: min(88vw, calc((100dvh - 360px) * 1.3333));
  }
}
@media (max-width: 480px) {
  .slider-btn { width: 2.5rem; height: 2.5rem; padding: .62rem; }
  .slide-info { font-size: .55rem; letter-spacing: .1em; }
  .slide-info-wrap { gap: .3rem .8rem; }
  .slider-slide { width: min(90vw, calc((100vh - 330px) * 1.3333)); }
  .slider-slide { width: min(90vw, calc((100dvh - 330px) * 1.3333)); }
}
@media (max-width: 380px) {
  .slider-lines { gap: 12px; }
}
@media (max-height: 560px) {
  /* низкие окна: поджимаем шапку и подвал, чтобы всё поместилось */
  .top { padding-top: 12px; padding-bottom: 10px; }
  .top h1 a { margin: .1rem 0 .35rem; }
  .work-title { margin-bottom: 8px; }
  .footer { padding-top: 14px; padding-bottom: 14px; }
  .footer .social-link { margin-bottom: .6rem; }
  .footer-arrow { margin-bottom: .5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .slider-slide,
  .slide-frame,
  .slider-btn,
  .footer .social-link a { transition: none; }
  .slider-btn:active { transform: none; }
  .footer-arrow { animation: none; opacity: .9; }
}

