@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Space+Grotesk:wght@300;400;500&display=swap');

@font-face {
  font-family: 'Shlapak';
  src: url('font/Shlapak Script.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

:root {
  --bg: #F7F6F3;
  --black: #080808;
  --red: #E8001D;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeBlend in='SourceGraphic' mode='multiply'/%3E%3C/filter%3E%3Crect width='250' height='250' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 400px 400px;
  color: var(--black);
  font-family: 'Space Grotesk', sans-serif;
  overflow-x: hidden;
  cursor: none;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━
   CUSTOM CURSOR
━━━━━━━━━━━━━━━━━━━━━━━━━━ */
#cursor {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
}
#cursor svg { display: block; }
#cursor-dot {
  transition: transform 0.2s ease;
  transform-origin: center;
}
#cursor.hovering #cursor-dot { transform: scale(3); }
a, button, .photo-card { cursor: none; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━
   NAV
━━━━━━━━━━━━━━━━━━━━━━━━━━ */
nav {
  position: sticky;
  top: 0;
  z-index: 500;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 28px 5% 12px;
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeBlend in='SourceGraphic' mode='multiply'/%3E%3C/filter%3E%3Crect width='250' height='250' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  background-size: 400px 400px;
  border-bottom: 1.5px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
nav.scrolled {
  border-bottom-color: var(--red);
  box-shadow: 0 1px 0 0 var(--red);
}

.nav-left {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.nav-sub {
  font-family: 'Shlapak', cursive;
  font-size: 28px;
  font-weight: normal;
  color: #999;
  line-height: 1;
  margin-bottom: 1px;
}

.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(36px, 5.5vw, 62px);
  color: var(--black);
  text-decoration: none;
  letter-spacing: 0.05em;
  line-height: 1;
  filter: blur(2.5px);
  transition: filter 0.3s;
}
.nav-logo:hover { filter: blur(0); }

.nav-links {
  display: flex;
  flex-wrap: nowrap;
  gap: 28px;
  align-self: flex-end;
  padding-bottom: 4px;
  white-space: nowrap;
}

.nav-links a {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--black);
  text-decoration: none;
  transition: color 0.15s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 1.5px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.nav-links a.active::after,
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.active,
.nav-links a:hover { color: var(--red); }

.language-switcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  gap: 3px;
  margin-left: 2px;
  padding-left: 12px;
  border-left: 1px solid rgba(0,0,0,0.18);
}
.language-switcher button {
  min-width: 36px;
  min-height: 44px;
  border: 0;
  padding: 0 5px;
  background: transparent;
  color: #777;
  font: 500 9px 'Space Grotesk', sans-serif;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color 0.15s;
}
.language-switcher button:hover,
.language-switcher button[aria-pressed="true"] { color: var(--red); }
.language-switcher button:focus-visible { outline: 1px solid var(--red); outline-offset: 2px; }
.nav-links > a, .language-switcher button { line-height: 1; }

/* ── GALLERY ── */
.gallery-wrap {
  display: block;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 20px 3vw 0;
  position: relative;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  width: 100%;
}

/* Photo card */
.photo-card {
  break-inside: avoid;
  display: block;
  width: 100%;
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
  cursor: none;
  z-index: 1;
  opacity: 0;
  translate: 0 18px;
  transition: opacity 0.55s ease, translate 0.55s ease;
}

.photo-card.visible {
  opacity: 1;
  translate: 0 0;
}

.photo-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid var(--red);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  z-index: 2;
}
.photo-card:hover::after { opacity: 1; }
.photo-card:hover { z-index: 20; }

.photo-inner {
  overflow: hidden;
  position: relative;
  line-height: 0;
  border-radius: 1px;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Пока фото не загрузилось — резервируем место под него.
   Без этого карточки схлопываются в нулевую высоту, все попадают
   в первый экран, и браузер грузит всю галерею сразу вместо lazy. */
.photo-inner img:not([data-loaded]) { aspect-ratio: 4 / 5; }
.photo-card.big .photo-inner img:not([data-loaded]) { aspect-ratio: 4 / 5; }

.photo-inner img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
  filter: contrast(1.04);
}

.photo-card:hover .photo-inner img { transform: scale(1.03); }

/* Big photo card */
.photo-card.big {
  z-index: 5;
  margin-bottom: 0;
  transform-origin: top center;
}

/* ── VIDEO ── */
.photo-inner video {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
  filter: contrast(1.04);
}
.photo-inner:has(video) {
  aspect-ratio: 9 / 16;
  background: #111;
}
.gallery-main-row .photo-inner:has(video) {
  aspect-ratio: 11 / 14;
}
.photo-inner:has(video) video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-inner { position: relative; }
.photo-card:hover .photo-inner video { transform: scale(1.03); }

#lb-video {
  display: none;
  width: 90vw;
  max-width: 900px;
  aspect-ratio: 16/9;
  border: none;
  cursor: default;
}

/* ── Gallery intro ── */
.gallery-intro {
  padding: 24px 3% 28px;
  display: flex;
  justify-content: flex-end;
}
.gallery-intro-quote {
  font-family: 'Shlapak', cursive;
  font-size: 15px;
  color: #AAAAAA;
  line-height: 1.7;
  letter-spacing: 0.04em;
  max-width: 320px;
  text-align: right;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━
   CTA SECTION
━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.cta-section {
  margin-top: 80px;
  background: var(--black);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeBlend in='SourceGraphic' mode='multiply'/%3E%3C/filter%3E%3Crect width='250' height='250' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  background-size: 400px 400px;
  padding: 72px 5% 64px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}
.cta-big {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(72px, 14vw, 180px);
  line-height: 0.84;
  letter-spacing: 0.02em;
  color: var(--bg);
  filter: blur(3px);
  transition: filter 0.4s;
}
.cta-section:hover .cta-big { filter: blur(0); }
.cta-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 18px;
  padding-bottom: 8px;
}
.cta-tagline {
  font-family: 'Shlapak', cursive;
  font-size: clamp(28px, 2vw, 22px);
  color: rgba(247,246,243,0.4);
  line-height: 1.6;
  text-align: right;
  max-width: 280px;
}
.cta-btn {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 0.26em;
  color: var(--black);
  background: var(--red);
  text-decoration: none;
  padding: 12px 28px 10px;
  display: inline-block;
  transition: background 0.2s, color 0.2s;
}
.cta-btn:hover { background: var(--bg); color: var(--black); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━
   FOOTER
━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.site-footer {
  background: var(--black);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeBlend in='SourceGraphic' mode='multiply'/%3E%3C/filter%3E%3Crect width='250' height='250' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  background-size: 400px 400px;
  border-top: 1px solid rgba(247,246,243,0.07);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 28px 5% 28px;
  margin-top: 0;
}

.site-footer-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(20px, 3.5vw, 40px);
  letter-spacing: 0.05em;
  color: rgba(247,246,243,0.15);
  filter: blur(1px);
  line-height: 1;
}

.site-footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.site-footer-links a {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(247,246,243,0.32);
  text-decoration: none;
  transition: color 0.15s;
}
.site-footer-links a:hover { color: var(--red); }

/* ── page footer cross — убираем, заменено на CTA ── */
.page-footer-cross { display: none; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━
   LIGHTBOX
━━━━━━━━━━━━━━━━━━━━━━━━━━ */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.96);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  cursor: none;
}
#lightbox.open { display: flex; }
#lb-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  display: block;
  cursor: default;
  user-select: none;
}
#lb-close {
  position: fixed;
  top: 20px; right: 28px;
  background: none;
  border: none;
  color: #fff;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 48px;
  line-height: 1;
  cursor: none;
  opacity: 0.5;
  transition: opacity 0.2s;
  z-index: 1001;
}
#lb-close:hover { opacity: 1; }
#lb-prev, #lb-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: none;
  opacity: 0.3;
  transition: opacity 0.2s;
  padding: 24px 18px;
  z-index: 1001;
}
#lb-prev { left: 8px; }
#lb-next { right: 8px; }
#lb-prev:hover, #lb-next:hover { opacity: 1; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━
   ABOUT PAGE
━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.about-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 72px);
}

.about-photo {
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  overflow: hidden;
  padding: 0;
  box-sizing: border-box;
}
.about-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  border-right: 3px solid var(--red);
  pointer-events: none;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
  filter: contrast(1.07);
}

.about-content {
  padding: 72px 6% 80px 7%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 36px;
}

.about-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(72px, 10vw, 130px);
  line-height: 0.85;
  letter-spacing: 0.03em;
}
.about-name .dot { color: var(--red); }

.about-bio {
  font-family: 'Shlapak', cursive;
  font-size: clamp(20px, 2.4vw, 27px);
  line-height: 1.7;
  color: #1A1A1A;
  margin-bottom: 1.7em;
  max-width: 380px;
}

.about-divider {
  width: 48px;
  height: 2px;
  background: var(--red);
}

.about-links { display: flex; flex-direction: column; width: 100%; }

.about-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: var(--black);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 18px 0;
  border-bottom: 1px solid rgba(0,0,0,0.09);
  transition: color 0.2s, padding-left 0.2s;
}
.about-link:hover { color: var(--red); padding-left: 10px; }

.link-arrow {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px;
  letter-spacing: 0;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE
━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 900px) {
  .cta-section { flex-direction: column; align-items: flex-start; }
  nav { align-items: flex-end; flex-wrap: nowrap; gap: 10px; }
  .nav-left { flex: 0 1 auto; min-width: 0; }
  .nav-logo { font-size: clamp(32px, 5vw, 48px); }
  .nav-sub { font-size: 20px; }
  .nav-links { flex: 0 0 auto; width: auto; gap: clamp(7px, 1vw, 12px); align-self: flex-end; align-items: center; justify-content: flex-end; padding: 0; }
  .nav-links a { font-size: 9px; letter-spacing: 0.04em; white-space: nowrap; }
  .language-switcher { display: inline-flex; visibility: visible; opacity: 1; flex: 0 0 auto; gap: 0; margin-left: 0; padding-left: 5px; }
  .language-switcher button { min-width: 32px; min-height: 0; height: auto; padding: 0 2px; font-size: 8px; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}

@media (min-width: 901px) {
  nav { flex-wrap: nowrap; }
  .nav-left { flex: 0 0 auto; }
  .nav-links { flex: 0 0 auto; width: auto; justify-content: flex-end; gap: clamp(14px, 2vw, 28px); align-self: center; padding: 0; }
  .nav-links > a { display: inline-flex; align-items: center; min-height: 36px; }
  .nav-links > a, .language-switcher button { height: 36px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; padding-top: 0; padding-bottom: 0; line-height: 1; }
  .language-switcher { margin-left: 4px; align-self: center; height: 36px; }
  .gallery-wrap { width: 100%; max-width: 100%; margin-left: 0; padding-right: 3%; padding-left: 3%; }
  .gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .about-wrap { grid-template-columns: 1fr; }
  .about-photo {
    position: relative; top: 0;
    height: 75vw;
    padding: 0;
  }
  .about-photo::after { border-right: none; border-bottom: 3px solid var(--red); }
  .about-content { padding: 40px 8% 60px; justify-content: flex-start; }
  .about-bio { font-size: clamp(18px, 3.5vw, 24px); max-width: 100%; }
}

@media (max-width: 600px) {
  nav { padding: 12px 5% 10px; align-items: stretch; flex-wrap: wrap; gap: 0; }
  .nav-left { flex: 0 0 100%; }
  .nav-logo { font-size: clamp(28px, 9vw, 44px); filter: blur(2px); }
  .nav-sub { font-size: 13px; }
  .nav-links { flex: 0 0 100%; width: 100%; gap: 4px; align-self: stretch; justify-content: space-between; padding: 8px 0 0; }
  .nav-links a { font-size: 8px; letter-spacing: 0.04em; }
  .language-switcher button { min-height: 44px; height: 44px; }

  .gallery-intro { padding: 14px 3% 10px; }
  .gallery-intro-quote { font-size: 13px; max-width: 100%; text-align: right; }

  .gallery-wrap { padding: 10px 2% 0; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .photo-card { margin-bottom: 0; }

  .cta-section { padding: 48px 5% 44px; }
  .cta-big { font-size: clamp(64px, 18vw, 120px); }

  .about-photo { height: 80vw; }
  .about-content { padding: 32px 6% 50px; gap: 20px; }
  .about-bio { font-size: clamp(18px, 5vw, 24px); margin-bottom: 1em; }
  .about-link { padding: 14px 0; font-size: 9px; }

  #lb-close { font-size: 36px; top: 14px; right: 28px; }
  #lb-prev, #lb-next { font-size: 22px; padding: 28px 12px; }
  #lb-img { max-width: 96vw; max-height: 86vh; }
}
