/* ---------- ШРИФТ INTER (вшит локально, папка fonts/) ---------- */
/* Один вариативный файл покрывает все начертания 100–900. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* ---------- БАЗА ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #000;
  --fg: #fff;
  --placeholder: #d6d6d6;   /* серый блок, если фото ещё нет */
  --muted: #cfcfcf;
  --radius: 4px;            /* скругление картинок (меньше, чем было) */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html { scroll-behavior: smooth; }
body { overflow-x: hidden; }   /* страховка от горизонтального скролла на узких экранах */

body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;                              /* хедер / текст — Regular */
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  opacity: 0;
  animation: pageIn 0.6s var(--ease) forwards;   /* плавное появление страницы */
}
@keyframes pageIn { to { opacity: 1; } }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- ШАПКА ---------- */
.header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 32px;
}

.nav { display: flex; gap: 22px; }

.nav-link {
  position: relative;
  font-size: 17px;
  font-weight: 400;            /* хедер — Regular */
  opacity: 0.92;
  transition: opacity 0.25s var(--ease);
}
.nav-link:hover { opacity: 1; }
/* плавно выезжающее подчёркивание */
.nav-link::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -4px;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav-link:hover::after,
.nav-link.is-active::after { transform: scaleX(1); }

.logo {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-weight: 800; font-size: 24px; letter-spacing: -0.1em;   /* логотип — ExtraBold */
  white-space: nowrap;
  transition: opacity 0.25s var(--ease);
}
.logo:hover { opacity: 0.8; }

.socials { display: flex; align-items: center; gap: 16px; }
.social {
  display: inline-flex; opacity: 0.92;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.social:hover { opacity: 1; transform: translateY(-2px); }

/* ---------- СЕТКА ПАПОК (главная) ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 36px;
  max-width: 1320px;
  margin: 34px auto 100px;
  padding: 0 40px;
}

.folder {
  cursor: pointer;
  opacity: 0;
  animation: fadeUp 0.6s var(--ease) forwards;   /* ступенчатое появление (задержка из JS) */
}

.folder-stack {
  position: relative;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--placeholder);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
/* при наведении карточка плавно увеличивается */
.folder:hover .folder-stack {
  transform: scale(1.02);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5);
}

.folder-cover { position: absolute; inset: 0; }
.folder-cover img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s var(--ease);
}
/* фото внутри рамки тоже немного зумится */
.folder:hover .folder-cover img { transform: scale(1.06); }

/* затемнение для читаемости названия (появляется при наведении) */
.folder-veil {
  position: absolute; inset: 0; z-index: 1;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.folder:hover .folder-veil { opacity: 1; }

/* название по центру фото (появляется при наведении), Inter Light */
.folder-title {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  padding: 0 24px; text-align: center;
  font-size: 19px; font-weight: 300; letter-spacing: 0.2px; color: #fff;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.folder:hover .folder-title { opacity: 1; transform: none; }

/* ---------- СТРАНИЦА ABOUT ---------- */
.about {
  max-width: 1320px;
  margin: 40px auto 80px;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  min-height: 60vh;
  animation: fadeUp 0.6s var(--ease) both;
}
.about-text { max-width: 480px; }
.about-heading { font-weight: 700; font-size: 18px; margin-bottom: 24px; }
.about-text p { font-size: 15px; line-height: 1.5; color: var(--muted); margin-bottom: 18px; }
.about-photo {
  justify-self: center; max-width: 420px; width: 100%;
  border-radius: var(--radius); filter: grayscale(100%);
}

/* ---------- СТРАНИЦА CONTACT ---------- */
.contact {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4vh 32px 10vh;
  min-height: calc(100vh - 150px);          /* заполняет экран → блок по центру */
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  animation: fadeUp 0.6s var(--ease) both;
}
.contact-photo {
  width: 100%; max-width: 460px; margin: 0 auto 44px;
  border-radius: var(--radius); filter: grayscale(100%);
}
/* верхние строки — крупно и очень жирно (Inter Black) */
.contact-location {
  font-size: clamp(23px, 6.4vw, 74px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: clamp(28px, 7vh, 70px);
}
/* email / телефон — тоже крупно и жирно */
.contact-line {
  font-size: clamp(15px, 3.4vw, 34px);
  font-weight: 700;
  line-height: 1.45;
  color: var(--muted);
  overflow-wrap: break-word;
}
.contact-link { display: block; color: var(--muted); transition: color 0.2s var(--ease); }
.contact-link:hover { color: #fff; }
.contact-heading { font-weight: 800; font-size: 15px; margin: 38px 0 18px; }
.contact-rep-title { font-weight: 800; font-size: 15px; margin: 26px 0 6px; }

/* ---------- ЛИСТАЛКА / СЛАЙДЕР ---------- */
.gallery {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0, 0, 0, 0.96);
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.4s var(--ease), visibility 0.4s var(--ease);
}
.gallery.is-open { opacity: 1; visibility: visible; pointer-events: auto; }

.gallery-head {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 22px; font-size: 14px; color: var(--muted);
}
.gallery-title { font-weight: 700; color: #fff; }
.gallery-counter { opacity: 0.8; }
.gallery-open {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--muted); font-size: 13px;
  padding: 5px 12px; border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  transition: color 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.gallery-open:hover { color: #000; background: #fff; border-color: #fff; }
.gallery-open svg { display: block; }

.gallery-close {
  position: absolute; top: 16px; right: 24px; z-index: 2;
  background: none; border: none; color: #fff;
  font-size: 38px; line-height: 1; cursor: pointer; opacity: 0.85;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.gallery-close:hover { opacity: 1; transform: rotate(90deg); }

.gallery-body { position: relative; flex: 1; display: flex; align-items: center; min-height: 0; }

.gallery-viewport { overflow: hidden; width: 100%; height: 100%; }
.gallery-track { display: flex; height: 100%; transition: transform 0.55s var(--ease); }

.gallery-slide {
  flex: 0 0 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 0 70px 40px; cursor: pointer;
}
.gallery-slide img {
  max-width: 86vw; max-height: 80vh;
  object-fit: contain; border-radius: var(--radius);
  animation: fadeUp 0.5s var(--ease);
}
.gallery-ph {
  width: 60vw; max-width: 900px; aspect-ratio: 3 / 2;
  background: var(--placeholder); border-radius: var(--radius);
}

.gallery-nav {
  position: absolute; top: 50%; z-index: 2;
  background: none; border: none; color: #fff;
  font-size: 46px; cursor: pointer; padding: 10px 18px; opacity: 0.7;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.gallery-nav:hover { opacity: 1; }
.gallery-prev { left: 8px; transform: translateY(-50%); }
.gallery-next { right: 8px; transform: translateY(-50%); }
.gallery-prev:hover { transform: translateY(-50%) translateX(-4px); }
.gallery-next:hover { transform: translateY(-50%) translateX(4px); }

/* ---------- АДАПТИВ ---------- */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 44px 32px; }
  .about { grid-template-columns: 1fr; gap: 36px; text-align: center; }
  .about-text { max-width: none; }
}
@media (max-width: 560px) {
  .header { padding: 18px 18px; }
  .logo { font-size: 18px; }
  .nav { gap: 16px; }
  .grid { grid-template-columns: 1fr; max-width: 460px; gap: 40px; }
  .contact { padding-left: 18px; padding-right: 18px; }
  .gallery-slide { padding: 0 50px 30px; }
  .gallery-nav { font-size: 36px; padding: 8px 10px; }
}

/* ---------- меньше движения, если так настроена система ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  body, .folder, .about, .contact { opacity: 1 !important; transform: none !important; }
}
