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

html, body { overflow-x: hidden; }

body {
  min-height: 100vh;
  background: #cee8a2;
  font-family: 'Roboto', sans-serif;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Контейнер во весь экран с обрезкой — не даёт водяному знаку расширять страницу */
.bg-watermark {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.bg-watermark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.5;
}

.floating-logo {
  position: fixed;
  top: 10px;
  right: 30px;
  z-index: 100;
  pointer-events: none;
}
.floating-logo img {
  height: clamp(96px, 16vw, 225px);
  width: clamp(96px, 16vw, 225px);
  object-fit: contain;
}

/* Навигация */
.navbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vw, 32px) 28px;
  gap: 20px;
  border-bottom: 2px solid rgba(0,0,0,0.07);
  background: rgba(139, 195, 74, 0.35);
  backdrop-filter: blur(4px);
}


.nav-links {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: clamp(14px, 2.2vw, 22px);
  font-weight: 600;
  text-transform: uppercase;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 100%;
}

.nav-links a {
  color: #2a4a1a;
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: #5a9e2f; }

.nav-divider {
  color: #2a4a1a;
  opacity: 0.35;
}

/* Основной контент */
.main-content {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 clamp(20px, 4vw, 48px);
}

.hero-col {
  flex: 0 0 42%;
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.binom-gif {
  height: 65vh;
  max-width: 100%;
  width: auto;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.15));
}

/* Текст */
.text-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-left: 40px;
  padding-top: 80px;
}

.speech-bubble {
  position: absolute;
  background: white;
  border-radius: 18px;
  border: 2px solid rgba(0,0,0,0.08);
  padding: 16px 28px;
  font-size: clamp(24px, 3.4vw, 39px);
  font-family: 'Caveat', cursive;
  color: #2a4a1a;
  display: inline-block;
  box-shadow: 2px 3px 0 rgba(0,0,0,0.06);
  left: 37%;
  top: 18%;
  z-index: 20;
  min-width: 320px;
  max-width: min(90vw, 420px);
}

.speech-bubble span {
  display: inline-block;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.speech-bubble span.fade-out {
  opacity: 0;
  transform: translateY(-6px);
}
.speech-bubble span.fade-in {
  opacity: 1;
  transform: translateY(0);
}
.speech-bubble::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  border: 10px solid transparent;
  border-right-color: rgba(0,0,0,0.08);
}
.speech-bubble::after {
  content: '';
  position: absolute;
  left: -17px;
  top: 50%;
  transform: translateY(-50%);
  border: 9px solid transparent;
  border-right-color: white;
}

.main-title {
  font-size: clamp(28px, 5vw, 54px);
  font-weight: 700;
  color: #111;
  line-height: 1.15;
  text-transform: uppercase;
}
.main-title .t-line { display: block; }
/* «для музея будущего» увеличена в 1.106×, чтобы по ширине совпасть с верхней строкой */
.main-title .t-line--big { font-size: 1.106em; }

.subtitle {
  font-size: clamp(17px, 2.6vw, 29px);
  color: #111;
  font-weight: 400;
}

.copyright {
  position: fixed;
  bottom: 10px;
  right: 16px;
  font-size: 11px;
  color: rgba(30, 58, 14, 0.45);
  z-index: 10;
}

/* Кнопки городов */
.cities-bar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 14px 40px 24px;
}

.city-btn {
  border: 2px solid #1a1a1a;
  border-radius: 50px;
  padding: clamp(10px, 1.4vw, 14px) clamp(20px, 2.6vw, 32px);
  font-family: 'Roboto', sans-serif;
  font-size: clamp(15px, 2vw, 22px);
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  color: #1e3a0e;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.city-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}

.city-btn.green  { background: #7ec850; color: #fff; }
.city-btn.purple { background: #9c6fd4; color: #fff; }
.city-btn.grey   { background: #e8e8e8; color: #555; }
.city-btn.circle {
  padding: clamp(10px, 1.4vw, 14px) clamp(20px, 2.6vw, 32px);
  border-radius: 50px;
  background: #e8e8e8;
  color: #555;
  font-size: clamp(16px, 2.2vw, 24px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* ── Планшет: блоки встают в колонку ── */
@media (max-width: 900px) {
  .main-content {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 20px;
    gap: 16px;
  }
  .hero-col { flex: none; width: 100%; }
  .binom-gif { height: auto; max-height: 42vh; }

  .text-col {
    flex: none;
    width: 100%;
    align-items: center;
    padding-left: 0;
    padding-top: 0;
    gap: 12px;
  }
  .main-title,
  .subtitle { max-width: 100%; }

  /* Пузырь — в обычный поток, по центру, без хвостика */
  .speech-bubble {
    position: static;
    left: auto;
    top: auto;
    min-width: 0;
    max-width: 90vw;
    margin-bottom: 4px;
  }
  .speech-bubble::before,
  .speech-bubble::after { display: none; }
}

/* ── Мобильные ── */
@media (max-width: 600px) {
  .floating-logo { top: 6px; right: 10px; }
  .copyright {
    position: static;
    text-align: center;
    padding: 8px 16px 14px;
  }
  .bg-watermark img { opacity: 0.3; }
  .binom-gif { max-height: 36vh; }
}

/* ═══════════════════════════════════════════
   Страница «О проекте»
   ═══════════════════════════════════════════ */

.nav-links a.active {
  color: #5a9e2f;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.about-content {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  justify-content: center;
  padding: clamp(24px, 4vw, 56px) clamp(16px, 4vw, 40px);
}

/* Читаемая полупрозрачная «карточка» поверх водяного знака */
.about-card {
  max-width: 980px;
  width: 100%;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(6px);
  border: 2px solid rgba(0, 0, 0, 0.06);
  border-radius: 24px;
  padding: clamp(24px, 4vw, 52px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  color: #26331b;
}

/* clearfix — чтобы карточка охватывала плавающие фото */
.about-card::after,
.about-member::after {
  content: '';
  display: block;
  clear: both;
}

.about-card p {
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.65;
  margin-bottom: 20px;
}
.about-card p:last-child { margin-bottom: 0; }

.about-card strong { color: #2a4a1a; }

.about-greeting {
  font-family: 'Caveat', cursive;
  font-size: clamp(24px, 3vw, 34px) !important;
  line-height: 1.3 !important;
  color: #2a4a1a;
  font-weight: 700;
  margin-bottom: 28px !important;
}

/* Плавающие фото — текст их лаконично обходит */
.about-photo {
  border-radius: 18px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  display: block;
}

.float-right {
  float: right;
  width: clamp(200px, 30%, 300px);
  margin: 4px 0 20px 30px;
}
.float-left {
  float: left;
  width: clamp(200px, 30%, 300px);
  margin: 4px 30px 20px 0;
}

/* Первая фотка (робот + корги) — крупнее и во всю ширину колонки-обтекания */
.about-photo--hero {
  width: clamp(240px, 42%, 420px);
  border-radius: 20px;
}

.about-team-title {
  font-family: 'Caveat', cursive;
  font-size: clamp(26px, 3.4vw, 40px);
  color: #2a4a1a;
  line-height: 1.25;
  margin: 40px 0 28px;
  clear: both;
}

/* Блок участника команды */
.about-member {
  margin-bottom: 34px;
}

.about-thanks {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 2px dashed rgba(42, 74, 26, 0.2);
  clear: both;
}

.about-closing {
  margin-top: 32px;
  font-family: 'Caveat', cursive;
  font-size: clamp(24px, 3vw, 34px) !important;
  color: #2a4a1a;
  font-weight: 700;
  text-align: center;
}

/* ── Планшет ── */
@media (max-width: 760px) {
  .about-photo--hero {
    float: none;
    width: min(100%, 420px);
    margin: 8px auto 24px;
  }
}

/* ── Мобильные: фото не обтекаются, встают в столбик по центру ── */
@media (max-width: 560px) {
  .float-left,
  .float-right {
    float: none;
    width: min(100%, 260px);
    margin: 8px auto 14px;
  }
  .about-member {
    text-align: center;
  }
  .about-member p {
    text-align: left;
  }
}

/* ═══════════════════════════════════════════
   Страница «Серебринск» — галерея персонажей
   ═══════════════════════════════════════════ */

.serebrinsk-content {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(20px, 3vw, 40px) clamp(16px, 4vw, 48px) 44px;
}

.serebrinsk-head {
  text-align: center;
  margin-bottom: clamp(20px, 3.5vw, 40px);
}

.serebrinsk-title {
  font-size: clamp(36px, 7vw, 72px);
  font-weight: 900;
  color: #2a4a1a;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1;
}

.serebrinsk-subtitle {
  margin-top: 10px;
  font-family: 'Caveat', cursive;
  font-size: clamp(22px, 3.4vw, 36px);
  color: #5a9e2f;
  font-weight: 700;
}

/* Ряд карточек персонажей — в одну строку на десктопе */
.characters {
  width: 100%;
  max-width: 1180px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(14px, 2vw, 26px);
}

.char-card {
  flex: 1 1 0;
  min-width: 170px;
  max-width: 270px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(6px);
  border: 2px solid rgba(0, 0, 0, 0.06);
  border-radius: 22px;
  padding: 18px 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.char-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.char-img {
  width: 100%;
  height: clamp(180px, 22vw, 250px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.char-img img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.18));
}

/* Картинка с собственным (непрозрачным) фоном — оформляем как фото в рамке */
.char-img img.cut-photo {
  border-radius: 14px;
  filter: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

.char-name {
  margin-top: 14px;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 800;
  text-transform: uppercase;
  color: #2a4a1a;
  text-align: center;
  line-height: 1.15;
}

/* Секция «Локации» — ниже, обычного размера (можно чуть прокрутить) */
.serebrinsk-section-title {
  margin: clamp(32px, 5vw, 52px) 0 clamp(18px, 2.6vw, 28px);
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 900;
  text-transform: uppercase;
  color: #2a4a1a;
  text-align: center;
}

.locations {
  width: 100%;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(16px, 2.4vw, 28px);
}

.loc-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(6px);
  border: 2px solid rgba(0, 0, 0, 0.06);
  border-radius: 22px;
  padding: 18px 18px 16px;
  width: clamp(220px, 40vw, 300px);
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.loc-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.loc-img {
  width: 100%;
  display: flex;
  justify-content: center;
}
.loc-img img {
  width: clamp(160px, 22vw, 220px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.16));
}
/* Атрибут с собственным (непрозрачным) фоном — как обложка/фото в рамке */
.loc-img img.cut-photo {
  border-radius: 12px;
  filter: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

/* Узкие экраны — карточки по 2 в ряд */
@media (max-width: 640px) {
  .char-card { flex: 1 1 40%; max-width: none; }
  .char-img { height: clamp(150px, 30vw, 220px); }
}
