:root {
  --font-main: 'Oswald', 'Bebas Neue', Impact, sans-serif;
}

* { margin:0; padding:0; box-sizing:border-box; }

html, body {
  background:#0a0a0a;
  color:#e0e0e0;
  font-family: var(--font-main);
  overflow-x:hidden;
  -webkit-tap-highlight-color: transparent;
  min-height:100vh;
}
body {
  background: radial-gradient(ellipse at top, #1a1a1a 0%, #0a0a0a 60%), #0a0a0a;
  padding-top: 76px;
}
@media (max-width:768px){ body { padding-top: 130px; } }

/* ===== ПРЕЛОАДЕР ===== */
#preloader {
  position: fixed; inset: 0;
  background: #0a0a0a;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
#preloader.hidden { opacity: 0; visibility: hidden; }

.preloader-img {
  display: block;
  width: auto; height: auto;
  max-width: 280px;
  max-height: 280px;
  object-fit: contain;
  margin-bottom: 60px;
  user-select: none;
  pointer-events: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.08));
  animation: preloaderImgIn 0.9s ease-out, pulse 2.4s ease-in-out 0.9s infinite;
}

@keyframes preloaderImgIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.preloader-bar {
  width: 260px; height: 2px;
  background: #1a1a1a;
  position: relative; overflow: hidden;
  border-radius: 2px;
}
.preloader-bar-fill {
  position: absolute; left: 0; top: 0;
  width: 0%; height: 100%;
  background: linear-gradient(90deg, #666 0%, #fff 50%, #666 100%);
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}
.preloader-status {
  font-family: var(--font-main);
  font-weight: 400;
  margin-top: 24px;
  font-size: 13px; letter-spacing: 4px;
  color: #666;
}
#preloader-percent {
  color: #fff;
  min-width: 28px;
  display: inline-block;
  text-align: right;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}

@media (max-width: 768px) {
  .preloader-img {
    max-width: 200px;
    max-height: 200px;
    margin-bottom: 40px;
  }
  .preloader-bar { width: 200px; }
  .preloader-status { font-size: 11px; letter-spacing: 3px; }
}
/* ===== ХЕДЕР ===== */
#site-header {
  position: fixed; top:0; left:0; right:0;
  background: #000;
  border-bottom: 1px solid #1a1a1a;
  z-index: 1200;
}
.header-inner {
  padding: 12px 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  max-width: 1800px;
  margin: 0 auto;
}

.header-text {
  font-family: var(--font-main);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 5px;
  color: #888;
  justify-self: start;
  white-space: nowrap;
}

.header-logo {
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  user-select: none;
}
.header-logo-main {
  font-family: var(--font-main);
  font-weight: 400;
  font-size: 30px;
  letter-spacing: 8px;
  line-height: 1;
  background: linear-gradient(180deg, #fff 0%, #888 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 2px;
}
.header-logo-sub {
  font-family: var(--font-main);
  font-weight: 300;
  font-size: 10px;
  letter-spacing: 5px;
  color: #666;
  line-height: 1;
  margin-top: 2px;
}

/* ===== КНОПКА "КУПИТЬ НА OZON" ===== */
.header-link {
  justify-self: end;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-main);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 3px;
  color: #0a0a0a;
  text-decoration: none;
  padding: 10px 22px;
  background: linear-gradient(180deg, #ffffff 0%, #bfbfbf 100%);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 3px;
  box-shadow:
    0 4px 14px rgba(255,255,255,0.15),
    0 2px 4px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.9),
    inset 0 -1px 0 rgba(0,0,0,0.15);
  text-shadow: 0 1px 0 rgba(255,255,255,0.4);
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  animation: headerPulse 2.8s ease-in-out infinite;
  z-index: 0;
}

@keyframes headerPulse {
  0%, 100% {
    box-shadow:
      0 4px 14px rgba(255,255,255,0.15),
      0 2px 4px rgba(0,0,0,0.5),
      inset 0 1px 0 rgba(255,255,255,0.9),
      inset 0 -1px 0 rgba(0,0,0,0.15);
  }
  50% {
    box-shadow:
      0 4px 22px rgba(255,255,255,0.4),
      0 2px 6px rgba(0,0,0,0.55),
      inset 0 1px 0 rgba(255,255,255,0.95),
      inset 0 -1px 0 rgba(0,0,0,0.15);
  }
}

.header-link::after {
  content: '→';
  display: inline-block;
  font-size: 16px;
  font-weight: 700;
  transition: transform 0.3s ease;
}

.header-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -80%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    100deg,
    transparent 20%,
    rgba(255,255,255,0.85) 50%,
    transparent 80%
  );
  transform: skewX(-20deg);
  animation: headerShine 3.5s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: overlay;
}

@keyframes headerShine {
  0%   { left: -80%; }
  50%  { left: 140%; }
  100% { left: 140%; }
}

.header-link > * {
  position: relative;
  z-index: 2;
}

.header-link:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, #ffffff 0%, #d8d8d8 100%);
  color: #000;
  box-shadow:
    0 8px 22px rgba(255,255,255,0.35),
    0 3px 6px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,1),
    inset 0 -1px 0 rgba(0,0,0,0.1);
  animation-play-state: paused;
}
.header-link:hover::after {
  transform: translateX(4px);
}
.header-link:active {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .header-link,
  .header-link::before {
    animation: none;
  }
}

@media (max-width:768px){
  .header-inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 10px;
    padding: 10px 12px;
    justify-items: center;
  }
  .header-logo {
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
  }
  .header-logo-main { font-size: 22px; letter-spacing: 6px; }
  .header-logo-sub { font-size: 8px; letter-spacing: 4px; }

  .header-text {
    grid-row: 3;
    justify-self: center;
    font-size: 9px;
    letter-spacing: 2px;
    margin-top: -4px;
  }
  .header-link {
    grid-row: 2;
    justify-self: center;
    font-size: 11px;
    letter-spacing: 2px;
    padding: 7px 16px;
    gap: 6px;
  }
  .header-link::after {
    font-size: 13px;
  }
}

@media (max-width:420px){
  .header-logo-main { font-size: 19px; letter-spacing: 5px; }
  .header-logo-sub { font-size: 7px; letter-spacing: 3px; }
  .header-link {
    font-size: 10px;
    letter-spacing: 1.5px;
    padding: 6px 14px;
  }
}

/* ===== МОЗАИКА ===== */
#mosaic {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 1fr;
  grid-auto-flow: dense;
  gap: 6px;
  padding: 6px;
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  opacity: 0;
  transition: opacity 1s ease;
}
#mosaic.visible { opacity: 1; }

@media (max-width:1600px){ #mosaic { grid-template-columns: repeat(5, 1fr); } }
@media (max-width:1200px){ #mosaic { grid-template-columns: repeat(4, 1fr); } }
@media (max-width:800px) { #mosaic { grid-template-columns: repeat(3, 1fr); } }
@media (max-width:500px) { #mosaic { grid-template-columns: repeat(2, 1fr); } }

.tile {
  position: relative;
  overflow: hidden;
  background: #151515;
  cursor: pointer;
  border-radius: 2px;
  width: 100%;
  aspect-ratio: 1 / 1;
  will-change: transform;
  contain: layout paint;
}

.tile::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #151515 0%, #222 50%, #151515 100%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
  z-index: 0;
  pointer-events: none;
}
.tile.loaded::before { display: none; }
@keyframes shimmer { 0%{background-position:200% 0;} 100%{background-position:-200% 0;} }

.tile::after {
  content:''; position:absolute; top:0; left:-75%;
  width:50%; height:100%;
  background: linear-gradient(120deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.15) 45%,
    rgba(255,255,255,0.35) 50%,
    rgba(255,255,255,0.15) 55%,
    rgba(255,255,255,0) 100%);
  transform: skewX(-20deg);
  transition: left 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
  pointer-events:none;
  z-index:2;
}
.tile:hover::after, .tile.active::after { left: 125%; }

/* ===== ИЗОБРАЖЕНИЯ В ПЛИТКАХ ===== */
.tile .img-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.tile .img-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: sepia(0.1) saturate(0.9) contrast(1.05) brightness(0.98);
  transition: filter 0.5s ease;
}

.tile:hover .img-wrap img,
.tile.active .img-wrap img {
  filter: sepia(0) saturate(1) contrast(1) brightness(1);
}

.tile .img-light {
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
}
.tile .img-light.loaded { opacity: 1; }

.tile .img-full {
  opacity: 0;
  z-index: 2;
  transition: opacity 1.6s ease-in-out;
  pointer-events: none;
}
.tile .img-full.visible { opacity: 1; }

/* ===== ВИДЕО В ПЛИТКАХ ===== */
.tile.tile-video {
  cursor: default;
}

.tile-video-el {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.6s ease, filter 0.5s ease;
  filter: sepia(0.1) saturate(0.9) contrast(1.05) brightness(0.98);
  will-change: opacity;
}
.tile-video-el.loaded { opacity: 1; }

.tile.tile-video:hover .tile-video-el,
.tile.tile-video.active .tile-video-el {
  filter: sepia(0) saturate(1) contrast(1) brightness(1);
}

.tile.tile-video:hover::after,
.tile.tile-video.active::after {
  left: 125%;
}

.tile-video-el::-webkit-media-controls { display: none !important; }
.tile-video-el::-webkit-media-controls-enclosure { display: none !important; }

/* ===== КНОПКА "УВЕЛИЧИТЬ" ===== */
.zoom-btn {
  position:absolute; top:50%; left:50%;
  transform: translate(-50%, -50%) scale(0.6);
  background: rgba(30,30,30,0.88);
  color:#fff;
  padding: 9px 22px;
  font-family: var(--font-main);
  font-weight: 400;
  font-size:15px; letter-spacing:3px;
  opacity:0; pointer-events:none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  border:1px solid rgba(255,255,255,0.3);
  white-space:nowrap;
  z-index:4;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.tile:hover .zoom-btn, .tile.active .zoom-btn {
  opacity:1;
  transform: translate(-50%, -50%) scale(1);
}

/* ===== МЕТКИ ===== */
.tile .badges {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-start;
}
.tile .badges .badge {
  position: static;
  top: auto; left: auto;
}

.badge {
  position: absolute;
  top: 10px; left: 10px;
  z-index: 3;
  font-family: var(--font-main);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 2px;
  padding: 5px 10px 4px;
  border-radius: 2px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.15);
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  pointer-events: none;
}

.badge.new {
  background: rgba(255,255,255,0.95);
  color: #000;
  border-color: rgba(255,255,255,0.9);
}
.badge.top {
  background: rgba(0,0,0,0.85);
  color: #d4b572;
  border-color: rgba(212,181,114,0.6);
}
.badge.premium {
  background: linear-gradient(135deg, rgba(20,20,20,0.95) 0%, rgba(50,50,50,0.95) 100%);
  color: #fff;
  border-color: rgba(255,255,255,0.35);
  letter-spacing: 3px;
}

.badge.info {
  background: rgba(10,10,10,0.85);
  color: #ddd;
  border-color: rgba(255,255,255,0.25);
  letter-spacing: 0;
  font-size: 13px;
  padding: 4px 9px 3px;
  line-height: 1;
}
.badge.info::before {
  content: 'i';
  font-family: 'Times New Roman', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 15px;
}

@media (max-width:600px){
  .tile .badges { top: 6px; left: 6px; gap: 4px; }
  .badge {
    font-size: 9px;
    padding: 4px 7px 3px;
    letter-spacing: 1.5px;
  }
  .badge.info { font-size: 11px; padding: 3px 7px 2px; }
}

/* ===== КРУПНАЯ ПЛИТКА (2×2) ===== */
.tile.big {
  grid-column: span 2;
  grid-row: span 2;
}

@media (max-width:500px){
  .tile.big {
    grid-column: span 1;
    grid-row: span 1;
  }
}

/* ===== ЛАЙТБОКС ===== */
#lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.96);
  display: none;
  align-items: center; justify-content: center;
  z-index: 5000;
  padding: 20px;
}
#lightbox.active { display: flex; }


@keyframes lightboxIn {
  from { opacity:0; transform:scale(0.96); }
  to   { opacity:1; transform:scale(1); }
}

#lightbox-close, #lightbox-prev, #lightbox-next {
  position: absolute;
  background: rgba(30,30,30,0.8);
  border: 1px solid #333;
  color: #fff;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s ease;
  font-family: Arial, sans-serif;
  display: flex; align-items: center; justify-content: center;
  user-select: none;
}
#lightbox-close {
  top: 18px; right: 24px;
  width: 44px; height: 44px;
  font-size: 28px; line-height: 1;
}
#lightbox-prev, #lightbox-next {
  top: 50%; transform: translateY(-50%);
  width: 56px; height: 56px;
  font-size: 40px; line-height: 1;
}
#lightbox-prev { left: 24px; }
#lightbox-next { right: 24px; }

#lightbox-close:hover, #lightbox-prev:hover, #lightbox-next:hover {
  background: #fff; color: #000; border-color: #fff;
}

#lightbox-counter {
  position: absolute;
  bottom: 20px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-main);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 4px;
  color: #888;
  background: rgba(0,0,0,0.6);
  padding: 6px 14px;
  border: 1px solid #222;
  border-radius: 2px;
}

#lightbox-desc {
  position: absolute;
  left: 50%;
  bottom: 60px;
  transform: translateX(-50%);
  max-width: min(720px, calc(100% - 40px));
  padding: 14px 22px;
  background: rgba(15,15,15,0.85);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 3px;
  color: #ddd;
  font-family: var(--font-main);
  font-weight: 300;
  font-size: 16px;
  letter-spacing: 1.5px;
  line-height: 1.5;
  text-align: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 10;
}
#lightbox-desc.visible { opacity: 1; }

#lightbox.has-desc #lightbox-counter {
  bottom: auto;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
}

#lightbox-buy {
  position: absolute;
  left: 50%;
  bottom: 130px;
  transform: translateX(-50%);
  display: none;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  background: linear-gradient(180deg, #0d63ff 0%, #0050d6 100%);
  color: #fff;
  font-family: var(--font-main);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 4px;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 3px;
  box-shadow:
    0 6px 20px rgba(13,99,255,0.35),
    0 2px 6px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.22);
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  white-space: nowrap;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 11;
}
#lightbox-buy.visible {
  display: inline-flex;
  opacity: 1;
}
#lightbox-buy::before {
  content: '→';
  display: inline-block;
  font-size: 18px;
  transform: translateX(0);
  transition: transform 0.25s ease;
}
#lightbox-buy:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow:
    0 10px 28px rgba(13,99,255,0.5),
    0 4px 10px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.25);
}
#lightbox-buy:hover::before { transform: translateX(4px); }
#lightbox-buy:active {
  transform: translateX(-50%) translateY(0);
}

#lightbox:not(.has-desc) #lightbox-buy {
  bottom: 60px;
}

@media (max-width:768px){
  #lightbox img {
    max-width: calc(100% - 20px);
    max-height: calc(100% - 120px);
  }
  #lightbox-prev, #lightbox-next {
    width: 42px; height: 42px; font-size: 28px;
    top: auto; bottom: 70px; transform: none;
  }
  #lightbox-prev { left: 20px; }
  #lightbox-next { right: 20px; }
  #lightbox-close { top: 12px; right: 12px; width: 38px; height: 38px; font-size: 22px; }
  #lightbox-counter { bottom: 12px; font-size: 12px; }

  #lightbox-desc {
    bottom: 70px;
    font-size: 13px;
    letter-spacing: 1px;
    padding: 10px 16px;
    max-width: calc(100% - 20px);
  }
  #lightbox-buy {
    bottom: 150px;
    font-size: 13px;
    letter-spacing: 3px;
    padding: 11px 22px;
  }
  #lightbox:not(.has-desc) #lightbox-buy {
    bottom: 70px;
  }
}

/* ===== ЛОАДЕР ПОДГРУЗКИ ===== */
#loader {
  position: fixed;
  bottom: 90px; left: 50%;
  transform: translateX(-50%);
  padding: 10px 24px;
  background: rgba(20,20,20,0.85);
  border: 1px solid #2a2a2a;
  border-radius: 2px;
  font-family: var(--font-main);
  font-weight: 400;
  font-size: 14px; letter-spacing: 4px; color: #888;
  display: none;
  z-index: 2000;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
#loader.active { display: flex; align-items: center; gap: 10px; }
#loader::before {
  content: '';
  width: 10px; height: 10px;
  border: 1px solid #444; border-top-color: #aaa;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== ФУТЕР ===== */
#site-footer {
  position: relative;
  background: linear-gradient(180deg, #0a0a0a 0%, #000 100%);
  border-top: 1px solid #1a1a1a;
  padding: 80px 20px 40px;
  margin-top: 60px;
  text-align: center;
}
.footer-inner {
  max-width: 900px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center;
}
.footer-brand {
  font-family: var(--font-main);
  font-weight: 500;
  font-size: 72px; letter-spacing: 10px; line-height: 1;
  background: linear-gradient(180deg, #fff 0%, #555 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 24px;
}
.footer-line { width: 60px; height: 1px; background: #333; margin-bottom: 24px; }
.footer-motto {
  font-family: var(--font-main);
  font-weight: 300;
  font-style: italic;
  font-size: 28px; letter-spacing: 10px; color: #aaa;
  margin-bottom: 40px;
}
.footer-copy {
  font-family: var(--font-main);
  font-weight: 400;
  font-size: 12px; letter-spacing: 4px; color: #444;
}
@media (max-width:768px){
  #site-footer { padding: 60px 20px 30px; }
  .footer-brand { font-size: 48px; letter-spacing: 8px; }
  .footer-motto { font-size: 18px; letter-spacing: 6px; margin-bottom: 30px; }
  .footer-copy { font-size: 10px; letter-spacing: 3px; }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: #222; }
::-webkit-scrollbar-thumb:hover { background: #333; }

/* ===== ТЕКСТОВЫЕ БЛОКИ ===== */
.text-tile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  aspect-ratio: 1 / 1;
  width: 100%;
  height: 100%;
  color: #aaa;
  font-family: var(--font-main);
  font-weight: 300;
  font-size: clamp(11px, 1.2vw, 17px);
  letter-spacing: 3px;
  line-height: 1.6;
  text-align: center;
  text-transform: uppercase;
  white-space: pre-line;
  user-select: none;
  cursor: default;
  background: transparent;
  border: none;
  transition: color 0.4s ease, letter-spacing 0.4s ease;
}

.text-tile:hover {
  color: #fff;
  letter-spacing: 4px;
}

.text-tile.style-1 {
  /* чистый текст */
}

.text-tile.style-2::before,
.text-tile.style-2::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 1px;
  background: #444;
  transition: width 0.4s ease, background 0.4s ease;
}
.text-tile.style-2::before { top: 24%; }
.text-tile.style-2::after  { bottom: 24%; }
.text-tile.style-2:hover::before,
.text-tile.style-2:hover::after {
  width: 56px;
  background: #888;
}

.text-tile.style-3 {
  font-style: italic;
  font-weight: 300;
  letter-spacing: 2px;
}
.text-tile.style-3::before {
  content: '"';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Times New Roman', serif;
  font-size: 48px;
  color: #333;
  line-height: 1;
  font-style: normal;
}

.text-tile.style-4 {
  border-top: 1px solid #222;
  border-bottom: 1px solid #222;
}

@media (max-width:600px){
  .text-tile {
    padding: 10px;
    font-size: 10px;
    letter-spacing: 2px;
    line-height: 1.5;
  }
  .text-tile.style-2::before { top: 22%; }
  .text-tile.style-2::after  { bottom: 22%; }
  .text-tile.style-3::before { font-size: 32px; top: 6px; }
}

/* При наведении водяной знак становится заметнее */
.tile:hover .watermark,
.tile.active .watermark {
  color: rgba(255, 255, 255, 0.75);
}

/* На крупных плитках водяной знак чуть больше */
.tile.big .watermark {
  font-size: 16px;
  letter-spacing: 4px;
  right: 14px;
  bottom: 12px;
}

/* На мобильных — мельче и компактнее */
@media (max-width: 600px) {
  .watermark {
    font-size: 10px;
    letter-spacing: 2px;
    right: 6px;
    bottom: 5px;
  }
  .tile.big .watermark {
    font-size: 12px;
    letter-spacing: 3px;
    right: 8px;
    bottom: 7px;
  }
}

/* ===== ЛАЙТБОКС: ОБЁРТКА ФОТО + ВОДЯНОЙ ЗНАК ===== */
#lightbox-image-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: calc(100% - 140px);
  max-height: calc(100% - 60px);
  animation: lightboxIn 0.3s ease;
}

#lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 80px);
  object-fit: contain;
  box-shadow: 0 0 60px rgba(0,0,0,0.9);
  filter: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  pointer-events: none; /* клики не проходят */
}

/* Прозрачный слой-ловушка поверх фото — перехватывает попытки сохранить */
#lightbox-shield {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: transparent;
  cursor: default;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* ===== ВОДЯНОЙ ЗНАК В ЛАЙТБОКСЕ ===== */
#lightbox-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-28deg);
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  user-select: none;
  line-height: 1;
  gap: 8px;
  white-space: nowrap;
  opacity: 0.18;
  mix-blend-mode: difference;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.lb-wm-main {
  font-family: var(--font-main);
  font-weight: 500;
  font-size: clamp(40px, 8vw, 100px);
  letter-spacing: 16px;
  color: #fff;
}

.lb-wm-sub {
  font-family: var(--font-main);
  font-weight: 300;
  font-size: clamp(11px, 1.5vw, 18px);
  letter-spacing: 10px;
  color: #fff;
}

/* Дополнительные диагональные повторы водяного знака по углам */
#lightbox-image-wrap::before,
#lightbox-image-wrap::after {
  content: 'CRAYs';
  position: absolute;
  font-family: var(--font-main);
  font-weight: 400;
  font-size: clamp(14px, 1.8vw, 22px);
  letter-spacing: 6px;
  color: rgba(255,255,255,0.25);
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
  pointer-events: none;
  user-select: none;
  z-index: 6;
  mix-blend-mode: overlay;
}

#lightbox-image-wrap::before {
  top: 14px;
  left: 14px;
}

#lightbox-image-wrap::after {
  bottom: 14px;
  right: 14px;
}

@media (max-width: 768px) {
  #lightbox-image-wrap {
    max-width: calc(100% - 20px);
    max-height: calc(100% - 120px);
  }
  #lightbox img {
    max-height: calc(100vh - 140px);
  }
  .lb-wm-main {
    font-size: clamp(30px, 12vw, 70px);
    letter-spacing: 10px;
  }
  .lb-wm-sub {
    font-size: 10px;
    letter-spacing: 6px;
  }
  #lightbox-image-wrap::before,
  #lightbox-image-wrap::after {
    font-size: 11px;
    letter-spacing: 4px;
  }
}

/* ===== ВСПЛЫВАЮЩЕЕ ПРЕДУПРЕЖДЕНИЕ О ЗАЩИТЕ ===== */
#protection-hint {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: rgba(15,15,15,0.95);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  padding: 14px 28px;
  font-family: var(--font-main);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 4px;
  text-transform: uppercase;
  border-radius: 3px;
  opacity: 0;
  pointer-events: none;
  z-index: 10000;
  transition: opacity 0.3s ease, transform 0.3s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}

#protection-hint.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ===== ГЛОБАЛЬНАЯ ЗАЩИТА ИЗОБРАЖЕНИЙ ===== */
img, video {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  -webkit-touch-callout: none;
}

.tile,
#lightbox,
.img-wrap {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* ===== ЗАЩИТА ПРИ ПЕЧАТИ ===== */
@media print {
  body * {
    visibility: hidden !important;
  }
  body::before {
    content: 'CRAYs — Материалы защищены авторским правом. Печать запрещена.';
    visibility: visible;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: Arial, sans-serif;
    font-size: 24px;
    letter-spacing: 4px;
    color: #000;
    text-align: center;
    padding: 40px;
    border: 2px solid #000;
  }
}

/* При активной печати показываем заглушку в браузере */
body.printing #mosaic,
body.printing #lightbox {
  filter: blur(30px);
}



/* === Логотип + надпись в центральном блоке шапки === */
#site-header .header-logo {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 14px !important;
  line-height: 1 !important;
}

#site-header .header-logo .header-logo-img {
  display: block !important;
  height: 56px !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  max-height: 56px !important;
  min-height: 56px !important;
  object-fit: contain !important;
  flex-shrink: 0 !important;
  user-select: none;
  pointer-events: none;
  -webkit-user-drag: none;
}

#site-header .header-logo .header-logo-main {
  line-height: 1 !important;
  white-space: nowrap;
}

@media (max-width: 768px) {
  #site-header .header-logo .header-logo-img {
    height: 38px !important;
    max-height: 38px !important;
    min-height: 38px !important;
  }
  #site-header .header-logo {
    gap: 10px !important;
  }
}