/* =========================
   ШРИФТЫ
========================= */

@font-face {
  font-family: 'Constantine';
  src: url('fonts/Constantine.ttf') format('opentype');
  
}

@font-face {
  font-family: 'OSerif';
  src: url('fonts/OSerif.otf') format('opentype');
  
}

/* =========================
   БАЗА
========================= */

* {
  box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
	position: relative;
}

body {
  font-family: 'Constantine', serif;
  color: #d4af37;
  background: #000;
}

/* =========================
   ФОН
========================= */

body.home {
  background: #000;
}

/* =========================
   ИЕРАРХИЯ СЛОЁВ (ФИНАЛ)
========================= */

#bg-container {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-layer {
  z-index: 0;
  pointer-events: none;
}

.fog-layer {
  z-index: 1;
  pointer-events: none;
 }
 

/* =========================
   БОКОВЫЕ МЕНЮ
========================= */

.side-menu {
  position: fixed;
  top: 70%;                /* БЫЛО ~50% — стало ниже */
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 30px;
  font-weight: 700;
  pointer-events: auto;
  z-index: 3;
  
}

.side-menu.left {
  left: 30px;
  
}

.side-menu.right {
  right: 30px;
  text-align: right;
}

.side-menu a {
  color: #d4af37;
  text-decoration: none;
  font-size: 35px;
  letter-spacing: 5px;
  pointer-events: auto;
}

.side-menu a:hover {
  text-decoration: underline;
}

/* =========================
   ЦЕНТР
========================= */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0;

  position: relative;
  z-index: 2;
}

/* Название */
.title {
  font-family: 'OSerif', serif;
  font-size: 80px;
  letter-spacing: 6px;
  text-transform: uppercase;
  text-shadow: 2px 2px 10px rgba(0,0,0,0.9);
  margin-bottom: 60px;   /* расстояние ДО эмблемы */
  transform: translateY(-120px);
  
}

/* Пространство под эмблему */
.emblem-space {
  position: relative;
  margin-bottom: 70px;   /* расстояние ДО девиза */
}

/* Сама эмблема */
.emblem {
    width: 320px;        /* больше меньше */
	max-width: 70vw;     /* защита для маленьких экранов */
    height: auto;
    display: block;
	margin: 0 auto;
    position: relative;

    /* ОБЪЁМ */
    filter:
    drop-shadow(0 0 25px rgba(255, 215, 100, 0.35))
    drop-shadow(0 0 60px rgba(255, 215, 100, 0.15));
	
}

/* Rim light — подсветка краёв */
.emblem::after {
     content: "";
  position: absolute;
  inset: -40px;
  background: radial-gradient(
    circle,
    rgba(255, 215, 120, 0.15),
    rgba(255, 215, 120, 0.05),
    transparent 70%
  );
  z-index: -1;
}


/* Девиз */
.motto {
  font-family: 'OSerif', serif;
  font-size: 80px;
  letter-spacing: 3px;
  padding: 12px 28px;
  background: rgba(0,0,0,0.55);
  border: 1px solid #d4af37;
  text-transform: uppercase;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
  margin-top: 0;         /* можно регулировать */
  transform: translateY(120px);
}
/* =========================
   ФОН: СЛОИ
========================= */


/* Общий стиль слоёв */
.bg-layer {
    position: absolute;
    inset: 0;
    will-change: opacity;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    opacity: 0;
    transition: opacity 2.5s ease-in-out;
	z-index: 0;
}

/* Активный слой */
.bg-layer.active {
    opacity: 1;
}

/* Виньетка */
.bg-layer::after {
    content: "";
    position: absolute;
    inset: 0;

    background: radial-gradient(
        ellipse at center,
        rgba(0,0,0,0) 45%,
        rgba(0,0,0,0.85) 100%
    );
}

/* =========================
   ТУМАН НА ВСЮ СТРАНИЦУ
========================= */

.fog-layer {
  background: url("backgrounds/fog.png") repeat;
  opacity: 0.25;
  animation: none;
}


 /* УСТАВ контент */
.charter-content {
  overflow-y: auto;
  max-height: 75vh;
  padding-right: 10px;
}

.charter-content h3 {
  font-family: 'Constantine', serif;
  margin-top: 20px;
}

.charter-content p {
  line-height: 1.6;
  letter-spacing: 0.6px;
  margin: 8px 0;
}
 /* УСТАВ заголовок */
.charter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.charter-title {
  font-family: 'Constantine', serif;
  font-size: 26px;
  letter-spacing: 3px;
}

.charter-close {
  cursor: pointer;
  font-size: 22px;
}
/* УСТАВ окно */
.charter-window {
  width: 85%;
  max-width: 1200px;
  max-height: 100vh;

  background: rgba(0,0,0,0.55);
  border: 1px solid #d4af37;
  padding: 20px;

  color: #d4af37;
  font-family: 'Constantine', serif;

  transform: translateY(40px) scale(0.97);
  opacity: 0;
  transition: 
  transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
  opacity 0.35s ease;
  will-change: transform, opacity;
}

#charter-overlay.active .charter-window {
  transform: translateY(0) scale(1);
  opacity: 1;
}
/* УСТАВ фон */
#charter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: none;

  display: flex;
  justify-content: center;
  align-items: center;

  opacity: 0;
  pointer-events: none;
  z-index: 9999;
}

#charter-overlay.active {
  opacity: 1;
  pointer-events: all;
  backdrop-filter: blur(3px);
}
/* ===== СКРОЛЛБАР УСТАВА ===== */

.charter-content::-webkit-scrollbar {
  width: 8px;
}

.charter-content::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.4);
}

.charter-content::-webkit-scrollbar-thumb {
  background: #d4af37;
  border-radius: 6px;
  border: 2px solid rgba(0,0,0,0.4);
}

.charter-content::-webkit-scrollbar-thumb:hover {
  background: #e6c35a;
}
.charter-content {
  scrollbar-width: thin;
  scrollbar-color: #d4af37 rgba(0,0,0,0.4);
}

#contacts-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);

  display: flex;
  justify-content: center;
  align-items: center;

  opacity: 0;
  pointer-events: none;
  z-index: 9999;

  transition: opacity 0.5s ease;
}

#contacts-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* BLUR — ТОЛЬКО ЗДЕСЬ */
#contacts-overlay::before {
  content: "";
  position: absolute;
  inset: 0;

  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.35s ease;

  pointer-events: none; /* ← КРИТИЧНО */
}

#contacts-overlay.active::before {
  opacity: 1;
}


.contacts-panel {
  display: flex;
  gap: 80px;
}

.contacts-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.character {
  position: relative;
  cursor: pointer;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.character img {
  height: 320px;

  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.character:hover > img {
  transform: scale(1.05);
}

.character:hover:not(.no-hover) {
  transform: translateY(-12px);
}

.character .info {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.9);
  border: 1px solid #d4af37;
  color: #d4af37;
  padding: 10px 14px;
  font-size: 14px;
  white-space: nowrap;
  display: none;
}

.character.active .info {
  display: block;
}

.character .info a {
  color: #d4af37;
  text-decoration: none;
  font-weight: 600;
}

.character .info a:hover {
  text-decoration: underline;
}
.project-link {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.project-link img {
  width: 36px;
  height: 36px;
  opacity: 0.7;
  transition: transform 0.2s ease, opacity 0.2s ease
}

.project-link img:hover {
  opacity: 1;
  transform: scale(1.15);
}

/* ===== О НАС overlay ===== */

#about-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: none;

  display: flex;
  justify-content: center;
  align-items: center;

  opacity: 0;
  pointer-events: none;
  z-index: 9999;
}

#about-overlay.active {
  opacity: 1;
  pointer-events: all;
  backdrop-filter: blur(3px);
}

/* ===== окно ===== */

.about-window {
  width: 95%;
  max-width: none;
  height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(0,0,0,0.55);
  border: 1px solid #d4af37;
  padding: 20px;
  overflow-y: auto;  
  overflow-x: hidden;
  transform: translateY(40px) scale(0.97);
  opacity: 0;

  transition:
    transform 0.45s cubic-bezier(0.22,1,0.36,1),
    opacity 0.35s ease;
}

#about-overlay.active .about-window {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* ===== header ===== */

.about-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.about-title {
  font-size: 26px;
  letter-spacing: 3px;
}

.about-close {
  cursor: pointer;
  font-size: 22px;
}

/* ===== контент ===== */

.about-content p {
  line-height: 1.6;
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
  font-size: 20px;
  overflow: hidden;
}

/* ===== изображения ===== */

.about-images {
    flex: 1;

  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;

  overflow-y: auto;
  padding-right: 6px;
}

.about-images img {
  width: 100%;
  height: auto;

  object-fit: contain; /* ВАЖНО */
  border: 1px solid #d4af37;
}

.about-window::-webkit-scrollbar {
  width: 8px;
}

.about-window::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.4);
}

.about-window::-webkit-scrollbar-thumb {
  background: #d4af37;
  border-radius: 6px;
  border: 2px solid rgba(0,0,0,0.4);
}

.about-window {
  scrollbar-width: thin;
  scrollbar-color: #d4af37 rgba(0,0,0,0.4);
}

body.overlay-open {
  overflow: hidden;
}

html, body {
  overflow: hidden;
}
