/* ─── RESET ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --w:      360px;   /* left panel width */
  --pw:     140px;   /* panel width on project page */
  --pad:    40px;    /* panel horizontal padding */
  --font:   'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
  --white:  #ffffff;
  --dim:    rgba(255,255,255,0.45);
  --line:   rgba(255,255,255,0.08);
}

html, body {
  width: 100%; height: 100%;
  overscroll-behavior: none;
  overflow-x: hidden;
}

body {
  background: #000;
  color: var(--white);
  font-family: var(--font);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; cursor: pointer; }
button { background: none; border: none; color: inherit; cursor: pointer; font-family: inherit; }

/* ─── SLIDESHOW ─────────────────────────────────────────────────── */
#slideshow {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.slide.active { opacity: 1; }

/* Placeholder когда нет фото */
.slide-ph {
  width: 100%; height: 100%;
  background: #080808;
}

/* ─── SLIDE INFO: top-right ─────────────────────────────────────── */
.slide-info {
  position: fixed;
  top: 29px;
  right: 48px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 26px;
  letter-spacing: 2px;
  line-height: 34px;
  pointer-events: none;
  transition: opacity 0.4s;
}

#slide-title-el {
  color: var(--white);
  cursor: pointer;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: opacity 0.2s;
}

body.is-home #slide-title-el {
  pointer-events: all;
}

#slide-title-el:hover { opacity: 0.7; }

#slide-title-el::after {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--white);
  position: relative;
  top: 1px;
  flex-shrink: 0;
}

.slide-count {
  color: var(--dim);
}

/* Hidden on non-home pages */
body:not(.is-home) .slide-info { opacity: 0; pointer-events: none; }

/* ─── LEFT PANEL ────────────────────────────────────────────────── */
.panel {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--w);
  z-index: 10;
  padding: var(--pad);
  display: flex;
  flex-direction: column;
  transition: background 0.5s;
  pointer-events: auto;
}

/* HOME: transparent panel overlaying slideshow */
body.is-home .panel {
  background: linear-gradient(
    to right,
    rgba(0,0,0,0.72) 55%,
    rgba(0,0,0,0) 100%
  );
}

/* PAGES: solid black panel */
body.is-page .panel {
  background: #000;
  border-right: 1px solid var(--line);
}

/* PROJECT PAGE: thin panel */
body.is-project .panel {
  width: var(--pw);
  background: #000;
  border-right: 1px solid var(--line);
}

body.is-project .panel-brand,
body.is-project .p-nav { display: none; }

body.is-project #main {
  margin-left: var(--pw);
  background: #000;
}

body.is-project .proj-topbar {
  left: var(--pw);
}


/* Name block — pushed ~30vh from top */
.panel-brand {
  margin-top: 30vh;
  margin-bottom: 48px;
}

.p-name {
  display: block;
  font-size: 38px;
  font-weight: 600;
  font-style: italic;
  letter-spacing: 4px;
  line-height: 1.1;
  margin-bottom: 10px;
  color: var(--white);
  cursor: pointer;
  transition: opacity 0.2s;
}

.p-name:hover { opacity: 0.7; }

.p-role {
  display: block;
  font-size: 18px;
  font-weight: 300;
  font-style: italic;
  letter-spacing: 3px;
  color: var(--dim);
  line-height: 1.4;
}

/* Nav links */
.p-nav {
  display: flex;
  flex-direction: column;
}

/* Project subnav in left panel */
.proj-panel-nav {
  display: none;
  flex-direction: column;
  align-items: center;
  margin-top: 40vh;
  padding: 0;
}

body.is-project .proj-panel-nav {
  display: flex;
}

.proj-panel-nav a {
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 2px;
  line-height: 40px;
  color: var(--dim);
  display: inline-block;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  width: fit-content;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
}

.proj-panel-nav a:hover {
  color: var(--white);
  border-bottom: 1px dotted var(--white);
}

.proj-panel-nav a.active {
  color: var(--white);
  border-bottom: 1px solid var(--white);
}

.p-nav a {
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 2px;
  line-height: 46px;
  color: var(--dim);
  display: inline-block;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  width: fit-content;
}

.p-nav a:hover {
  color: var(--white);
  border-bottom: 1px dotted var(--white);
}

.p-nav a.active {
  color: var(--white);
  border-bottom: 1px solid var(--white);
}

/* ─── MOBILE HEADER ─────────────────────────────────────────────── */
.mob-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 52px;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  z-index: 30;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.mob-back {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  color: var(--white);
  cursor: pointer;
  background: none;
  border: none;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.mob-back:hover { opacity: 0.6; }

.mob-brand-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.mob-page-title {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 2px;
  color: var(--dim);
}

.mob-name {
  font-size: 16px;
  font-weight: 600;
  font-style: italic;
  letter-spacing: 3px;
  cursor: pointer;
}

.burger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  cursor: pointer;
}

.burger span {
  display: block;
  width: 20px;
  height: 1px;
  background: var(--white);
  transition: all 0.25s;
}

.burger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ─── MOBILE NAV ────────────────────────────────────────────────── */
.mob-nav {
  display: none;
  flex-direction: column;
  position: fixed;
  inset: 0;
  top: 52px;
  background: #000;
  z-index: 25;
  padding: 40px 18px;
  gap: 0;
  transform: translateX(100%);
  transition: transform 0.35s ease;
  pointer-events: none;
}

.mob-nav.open {
  transform: translateX(0);
  pointer-events: all;
}

.mob-nav a {
  display: block;
  font-size: 32px;
  font-weight: 300;
  letter-spacing: 4px;
  line-height: 1;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  transition: color 0.2s;
}

.mob-nav a:first-child { border-top: 1px solid var(--line); }
.mob-nav a:hover, .mob-nav a.active { color: var(--white); }

/* ─── MAIN CONTENT ──────────────────────────────────────────────── */
#main {
  margin-left: var(--w);
  position: relative;
  z-index: 5;
  min-height: 100vh;
}

/* Slideshow only on home */
body:not(.is-home) #slideshow { display: none; }

/* Home: transparent so slideshow shows through */
body.is-home #main {
  background: transparent;
  pointer-events: none;
}

/* Pages: solid black covers slideshow */
body.is-page #main {
  background: #000;
  display: flex;
  flex-direction: column;
}

/* ─── PAGES ─────────────────────────────────────────────────────── */
.page { display: none; }
.page.active { display: block; }

/* ─── PROJECT GRID ──────────────────────────────────────────────── */
.pgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  padding: 48px 48px 80px;
  background: #000;
}

@media (max-width: 1200px) {
  .pgrid { grid-template-columns: repeat(2, 1fr); gap: 28px; padding: 36px; }
}

.pcard {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: transparent;
}

.pcard-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  opacity: 0.9;
  transition: opacity 0.5s, transform 0.7s ease;
}

.pcard:hover .pcard-img {
  opacity: 1;
  transform: scale(1.02);
}

/* Текст внутри картинки — снизу, всегда виден */
.pcard-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 40px 18px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.72));
}

.pcard-title {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 2px;
  line-height: 1.3;
  margin-bottom: 3px;
}

.pcard-sub {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.6);
}

/* Плейсхолдер без фото */
.pcard-ph {
  aspect-ratio: 16 / 10;
  width: 100%;
  background: #0c0c0c;
}

/* ─── REELS GRID ─────────────────────────────────────────────────── */
.rgrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: #111;
}

@media (max-width: 1200px) {
  .rgrid { grid-template-columns: repeat(3, 1fr); }
}

.rcard {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #080808;
}

.rcard-img {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  opacity: 0.8;
  transition: opacity 0.5s, transform 0.7s;
}

.rcard:hover .rcard-img { opacity: 1; transform: scale(1.03); }

.rcard-over {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: flex-end;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.3s;
}

.rcard:hover .rcard-over { opacity: 1; }

/* ─── PROJECT PAGE ───────────────────────────────────────────────── */

/* Шапка страницы проекта — три колонки */
.proj-topbar {
  position: fixed;
  top: 0; left: var(--w); right: 0;
  height: 52px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  padding: 0 36px;
  z-index: 50;
  background: #000;
  border-bottom: 1px solid var(--line);
}

/* Левая колонка: название + субнав */
.proj-topbar-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 52px;
  overflow: visible;
}

.proj-top-title {
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 2.5px;
  line-height: 52px;
}

/* Субнав появляется при скролле или через класс */
.proj-subnav {
  display: flex;
  gap: 20px;
  padding-bottom: 8px;
}

.proj-subnav a {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 1.5px;
  color: var(--dim);
  cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.proj-subnav a:hover,
.proj-subnav a.active {
  color: var(--white);
  border-bottom: 1px solid var(--white);
}

/* Центр: имя */
.proj-topbar-center {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
}

.proj-top-name {
  font-size: 26px;
  font-weight: 600;
  font-style: italic;
  letter-spacing: 4px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.proj-top-name:hover { opacity: 0.6; }

/* Правая колонка: back */
.proj-topbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 52px;
}

.proj-top-back {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 2px;
  color: var(--dim);
  cursor: pointer;
  transition: color 0.2s;
}

.proj-top-back:hover { color: var(--white); }
.proj-top-back:hover svg { transform: translateX(-3px); }
.proj-top-back svg { transition: transform 0.2s; }

/* Контент страницы проекта */
#page-project {
  padding-top: 52px;
}

/* Секции */
.proj-section {
  scroll-margin-top: 52px;
}

/* Видео */
.proj-video {
  position: relative;
  width: calc(100% - 96px);
  margin: 48px;
  aspect-ratio: 16 / 9;
  background: #0a0a0a;
  overflow: hidden;
  display: block;
}

.proj-video-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.proj-video:hover .proj-video-thumb { opacity: 0.5; }

.proj-video-play {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--white);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 3px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.proj-video-play:hover { opacity: 0.8; }

/* Инфо под видео */
.proj-info {
  padding: 40px 48px 48px;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 80px;
  align-items: flex-start;
}

.proj-info-left { flex: 1; }

.proj-title {
  font-size: 30px;
  font-weight: 400;
  letter-spacing: 3px;
  line-height: 1.1;
  margin-bottom: 8px;
}

.proj-subtitle {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 2px;
  color: var(--dim);
}

.proj-desc {
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.5px;
  line-height: 1.8;
  color: rgba(255,255,255,0.5);
  max-width: 480px;
  margin-top: 20px;
  white-space: pre-line;
  text-transform: none;
}

.proj-meta {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 180px;
  margin-top: 4px;
}

.proj-meta-item { display: flex; flex-direction: column; gap: 4px; }

.proj-meta-label {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--dim);
}

.proj-meta-val {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 1.5px;
}

/* Галерея стилов */
.proj-screenshots {
  padding: 0;
}

.proj-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  background: #000;
}

.proj-gallery .gimg {
  overflow: hidden;
  cursor: zoom-in;
}

.proj-gallery .gimg img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  opacity: 0.9;
  transition: opacity 0.4s, transform 0.6s;
}

.proj-gallery .gimg:hover img {
  opacity: 1;
  transform: scale(1.02);
}

/* Лайтбокс */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  display: block;
}

.lightbox-close {
  position: absolute;
  top: 20px; right: 24px;
  font-size: 20px;
  color: var(--dim);
  cursor: pointer;
  transition: color 0.2s;
}

.lightbox-close:hover { color: var(--white); }

/* ─── EMPTY STATE ────────────────────────────────────────────────── */
.empty {
  padding: 120px 40px;
  font-size: 11px;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.1);
  text-align: center;
}

/* ─── CONTACT ────────────────────────────────────────────────────── */
.contact-inner {
  padding: 80px 48px;
  max-width: 520px;
}

.contact-list {
  border-top: 1px solid var(--line);
  margin-bottom: 40px;
}

.crow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.clabel {
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--dim);
}

.crow a {
  font-size: 16px;
  letter-spacing: 1.5px;
  font-weight: 400;
  transition: color 0.2s;
}

.crow a:hover { color: var(--dim); }

.cnote {
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--dim);
}

/* ─── SOCIAL FOOTER ──────────────────────────────────────────────── */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 22px 0 20px;
  border-top: 1px solid var(--line);
  margin-top: auto;
}

.site-footer a {
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 2px;
  color: var(--dim);
  transition: color 0.2s;
}

.site-footer a:hover { color: var(--white); }

.site-footer span {
  font-size: 13px;
  color: rgba(255,255,255,0.15);
}

/* На главной — fixed справа внизу */
body.is-home .site-footer {
  position: fixed;
  bottom: 28px;
  right: 48px;
  border-top: none;
  padding: 0;
  margin: 0;
  gap: 16px;
  justify-content: flex-end;
  z-index: 20;
}

/* ─── MODAL ──────────────────────────────────────────────────────── */
.modal-bg {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 100;
  overflow-y: auto;
  padding: 60px 24px;
}

.modal-bg.open { display: block; }

.modal {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  background: #000;
  border: 1px solid var(--line);
  animation: min 0.3s ease;
}

@keyframes min {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal-x {
  position: absolute;
  top: 18px; right: 18px;
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--dim);
  z-index: 5;
  transition: color 0.2s;
}

.modal-x:hover { color: var(--white); }

/* Стилы (фото) */
.m-stills {
  display: grid;
  gap: 2px;
  background: #111;
}

.m-stills.n1 { grid-template-columns: 1fr; }
.m-stills.n2 { grid-template-columns: 1fr 1fr; }
.m-stills.n3 { grid-template-columns: 2fr 1fr; }

.m-stills.n3 .ms:first-child { grid-row: span 2; }

.ms img {
  display: block;
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}

.ms-ph {
  aspect-ratio: 16/10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
  font-size: 10px;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.1);
}

/* Инфо */
.m-info {
  padding: 36px 40px 40px;
}

.m-cat {
  font-size: 12px;
  letter-spacing: 2.5px;
  color: var(--dim);
  margin-bottom: 10px;
}

.m-title {
  font-size: 34px;
  font-weight: 400;
  letter-spacing: 3px;
  margin-bottom: 6px;
  line-height: 1.1;
}

.m-sub {
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 2px;
  color: var(--dim);
  margin-bottom: 24px;
}

.m-desc {
  font-size: 16px;
  font-weight: 300;
  letter-spacing: 0.5px;
  line-height: 1.75;
  color: rgba(255,255,255,0.55);
  max-width: 520px;
  margin-bottom: 32px;
  white-space: pre-line;
  text-transform: none;
}

.m-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  margin-bottom: 30px;
}

.mm { display: flex; flex-direction: column; gap: 5px; }

.mm-label {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--dim);
}

.mm-val {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 1.5px;
}

.m-link {
  display: inline-block;
  border: 1px solid var(--line);
  padding: 10px 24px;
  font-size: 12px;
  letter-spacing: 2.5px;
  font-weight: 400;
  transition: border-color 0.2s, background 0.2s;
}

.m-link:hover {
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.04);
}

/* ─── RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .panel { display: none; }
  .mob-header { display: flex; }
  .mob-nav { display: flex; }
  .mob-home-nav { display: none; }
  .mob-role { display: none; }

  #main { margin-left: 0; padding-top: 52px; }

  .slide-info  { top: 14px; right: 18px; }
  .slide-arrows { bottom: 20px; right: 18px; }

  .pgrid { grid-template-columns: repeat(2, 1fr); gap: 1px; }
  .rgrid { grid-template-columns: repeat(2, 1fr); gap: 1px; }

  .proj-topbar { left: 0; padding: 0 18px; }
  .proj-top-title { font-size: 11px; letter-spacing: 1.5px; }
  .proj-subnav { gap: 14px; }
  .proj-info { flex-direction: column; gap: 32px; padding: 28px 18px; }
  .proj-screenshots { padding: 24px 18px 60px; }
  .proj-gallery { grid-template-columns: 1fr; gap: 16px; }
  .proj-title { font-size: 22px; }
  .pgrid { grid-template-columns: 1fr; gap: 32px; padding: 24px 18px 60px; }

  .contact-inner { padding: 40px 18px; }

  /* ── MOBILE HOME LAYOUT ── */
  body.is-home {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    overflow: hidden;
  }

  body.is-home .mob-header {
    order: 1;
    position: relative;
    background: transparent;
    border-bottom: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    height: auto;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 36px 18px 20px;
    gap: 0;
    flex-shrink: 0;
  }

  body.is-home .mob-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  body.is-home .mob-name {
    font-size: 26px;
    letter-spacing: 4px;
  }

  body.is-home .mob-role {
    display: block;
    font-size: 13px;
    font-weight: 300;
    font-style: italic;
    letter-spacing: 2.5px;
    color: var(--dim);
  }

  body.is-home .burger { display: none; }

  body.is-home #home-slide-wrap {
    order: 2;
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    flex-shrink: 0;
    z-index: 1;
  }

  body.is-home #slideshow {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: unset;
  }

  body.is-home .mob-home-nav {
    order: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 0;
    padding: 8px 0 20px;
  }

  body.is-home .mob-home-nav a {
    font-size: 22px;
    font-weight: 300;
    letter-spacing: 3px;
    color: var(--dim);
    padding: 10px 0;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s;
  }

  body.is-home .mob-home-nav a:hover,
  body.is-home .mob-home-nav a.active { color: var(--white); }

  body.is-home #main { display: none; }
  body.is-home .mob-nav { display: none !important; }
  body.is-home .burger { display: none; }

  /* Mobile home: slide title overlaid inside the image */
  body.is-home .slide-info {
    position: absolute;
    top: auto;
    bottom: 12px;
    left: 14px;
    right: auto;
    align-items: flex-start;
    font-size: 13px;
    line-height: 18px;
    z-index: 2;
  }
  body.is-home #slide-title-el::after { display: none; }

  /* ── MOBILE PAGE / PROJECT HEADER ── */
  body.is-page .mob-header,
  body.is-project .mob-header {
    display: grid;
    grid-template-columns: 36px 1fr 36px;
    align-items: center;
    justify-items: center;
  }

  body.is-page .mob-back,
  body.is-project .mob-back {
    display: flex;
    justify-self: start;
  }

  body.is-page .mob-brand,
  body.is-project .mob-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  body.is-page .mob-name,
  body.is-project .mob-name {
    font-size: 16px;
    letter-spacing: 3px;
  }

  body.is-page .burger,
  body.is-project .burger { display: flex; justify-self: end; }

  /* На проектной странице скрываем proj-topbar — используем mob-header */
  body.is-project .proj-topbar { display: none; }

  /* Фикс: убираем отступ и перекрываем слайдшоу */
  body.is-project #main { margin-left: 0; }
  body.is-project #slideshow { display: none; }
}

/* ─── SLIDE TAP OVERLAY (mobile home) ───────────────────────────── */
#slide-tap {
  display: none;
}

@media (max-width: 768px) {
  body.is-home #slide-tap {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 1;
    cursor: pointer;
  }
}

/* ─── FADE OVERLAY ───────────────────────────────────────────────── */
#fade-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s ease;
}



@media (max-width: 500px) {
  .pgrid { grid-template-columns: 1fr; }
  .rgrid { grid-template-columns: 1fr; }
}
