/* =========================================================
   MOBILE.CSS — CENTURION
   Работает ТОЛЬКО на телефонах
========================================================= */

@media (max-width: 768px) {

  /* =========================
     БАЗА
  ========================= */
  html, body {
    overflow-x: hidden;
  }

  body {
    font-size: 16px;
  }

  /* =========================
     УБИРАЕМ DESKTOP-МЕНЮ
  ========================= */
  .side-menu {
    display: none !important;
  }

  /* =========================
     HERO / ЦЕНТР
  ========================= */
  .hero {
    min-height: 100svh;
    padding: 40px 16px;
    justify-content: center;
    gap: 24px;
  }

  .title {
    font-size: clamp(28px, 8vw, 42px);
    letter-spacing: 3px;
    margin-bottom: 0;
    transform: none;
    text-align: center;
  }

  .emblem-space {
    margin-bottom: 0;
  }

  .emblem {
    width: 220px;
    max-width: 70vw;
    filter:
      drop-shadow(0 0 18px rgba(255,215,100,0.25));
  }

  .motto {
    font-size: clamp(22px, 6vw, 36px);
    letter-spacing: 2px;
    padding: 10px 18px;
    transform: none;
    text-align: center;
  }

  /* =========================
     ФОН / ТУМАН (FPS SAFE)
  ========================= */
  .fog-layer {
    opacity: 0.2;
    animation: none;
  }

  /* =========================
     УСТАВ
  ========================= */
  .charter-window {
    max-height: calc(100svh - 24px);
    height: auto;

    display: flex;
    flex-direction: column;

    padding: 16px 14px 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
  
  .charter-content {
    max-height: none;
    flex: 1;
    overflow-y: auto;

    padding-bottom: 12px;
  }

  .charter-title {
    font-size: 20px;
    letter-spacing: 2px;
  }

  .charter-close {
    font-size: 24px;
  }

  .charter-content p {
    font-size: 16px;
    line-height: 1.6;
  }

  /* =========================
     О НАС
  ========================= */
  .about-window {
    width: 95%;
    height: 90svh;
    padding: 16px;
  }

  .about-title {
    font-size: 20px;
  }

  .about-close {
    font-size: 24px;
  }

  .about-content p {
    font-size: 16px;
  }

  .about-images {
    grid-template-columns: 1fr;
  }

  /* =========================
     КОНТАКТЫ
  ========================= */
  .contacts-panel {
    flex-direction: column;
    gap: 36px;
  }

  .character {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .character img {
    height: 220px;
  }

  .character .info {
    position: static;
    transform: none;
    margin-top: 10px;
    display: block;
    text-align: center;
  }

  .project-link img {
    width: 44px;
    height: 44px;
    opacity: 1;
  }

}

/* =========================
   МАЛЕНЬКИЕ ЭКРАНЫ
========================= */
@media (max-width: 420px) {

  .title {
    font-size: 26px;
  }

  .motto {
    font-size: 20px;
    padding: 8px 14px;
  }

  .emblem {
    width: 200px;
  }
}

/* =========================
   MOBILE MENU
========================= */

/* =========================
   CONTACTS — MOBILE UX
========================= */
@media (max-width: 768px) {

  #contacts-overlay {
    align-items: flex-end; /* вместо center */
  }

  .contacts-content {
    width: auto;
    max-height: 90svh;

    padding: 20px 16px 32px;
    overflow-y: auto;

    border-radius: 16px 16px 0 0;
  }

  .contacts-panel {
	display: inline-flex;
    flex-direction: column;
    gap: 32px;
	align-items: center;
  }

  .character {
    width: 100%;
    align-items: center;
  }

  .character img {
    height: 180px;
  }

  .character .info {
    position: static;
    display: block;
    margin-top: 12px;
    text-align: center;
    white-space: normal;
  }

  .mobile-menu-btn {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 10001;

    background: rgba(0,0,0,0.6);
    border: 1px solid #d4af37;
    color: #d4af37;

    font-size: 28px;
    padding: 10px 14px;
    cursor: pointer;
  }

  #mobile-menu {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(6px);

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    z-index: 10000;
  }

  #mobile-menu.active {
    opacity: 1;
    pointer-events: all;
  }

  .mobile-menu-panel {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 24px;

    text-align: center;
  }

  .mobile-menu-panel a {
    color: #d4af37;
    text-decoration: none;
    font-size: 24px;
    letter-spacing: 3px;
  }

  .mobile-join {
    margin-top: 12px;
    padding: 12px 20px;
    border: 1px solid #d4af37;
    background: rgba(0,0,0,0.4);
  }

  .mobile-close {
    margin-top: 40px;
    background: none;
    border: none;
    color: #d4af37;
    font-size: 28px;
    cursor: pointer;
  }
}

/* Скрываем кнопку меню, когда открыт overlay */
body.overlay-open .mobile-menu-btn {
  opacity: 0;
  pointer-events: none;
}
