/*
  =================================
  === ГЛОБАЛЬНЫЕ ПЕРЕМЕННЫЕ И СТИЛИ
  =================================
*/

/*
  Базовые переменные.
*/
:root {
  --accent: #ffb347;
  --text: #f4f4f4;
  --muted: #b0b0b0;
  --bg: #23272f;
  --block-radius: 22px;
  --block-gradient: linear-gradient(135deg, #1e2229 0%, #292f38 100%);
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Montserrat', Arial, sans-serif;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body {
  position: relative;
  z-index: 1;
}

.background-image {
  position: absolute;
  z-index: 0;
  left: 800px;
  bottom: 350px;
  width: 360px;
  height: auto;
  pointer-events: none;
  user-select: none;
  opacity: 0; /* Начальная прозрачность для анимации */
  filter: grayscale(1) brightness(1) invert(-1);
  mix-blend-mode: lighten;
  /* Анимация появления */
  animation: fadeInUp 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.5s forwards;
}

/*
  =================================
  === HEADER
  =================================
*/

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 10;
  background: linear-gradient(to bottom, rgba(35, 39, 47, 0.92) 60%, rgba(35, 39, 47, 0.65) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 32px;
  height: 68px;
  box-sizing: border-box;
  user-select: none;
  border-bottom: 1px solid rgba(80, 80, 80, 0.13);
}

nav.menu {
  display: flex;
  gap: 28px;
}

.menu-link {
  font-size: 1.09rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  position: relative;
}

.menu-link:hover, .menu-link:focus {
  color: var(--accent);
  outline: none;
}

/*
  =================================
  === ОСНОВНОЙ КОНТЕНТ
  =================================
*/

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 110px 24px 0 24px;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
}

.site-title {
  text-align: center;
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: 2px;
  margin: 0 0 0.2em 0;
  color: var(--accent);
  line-height: 1.1;
  user-select: none;
  opacity: 0; /* Начальная прозрачность для анимации */
  /* Анимация появления */
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.1s forwards;
}

.subtitle {
  text-align: center;
  color: var(--muted);
  font-size: 1.22rem;
  margin-bottom: 38px;
  letter-spacing: 0.01em;
  opacity: 0; /* Начальная прозрачность для анимации */
  /* Анимация появления */
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
}

.main-text {
  font-size: 1.15rem;
  line-height: 1.7;
  letter-spacing: 0.01em;
  margin-bottom: 48px;
  opacity: 0; /* Начальная прозрачность для анимации */
  /* Анимация появления */
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.4s forwards;
}

.content-block {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.main-text strong {
  color: var(--accent);
  font-weight: 700;
}

/*
  =================================
  === ПРОМО-БЛОКИ
  =================================
*/

.promo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 48px;
  align-items: flex-start;
  justify-content: center;
}

.promo-block {
  position: relative;
  width: 340px;
  height: 190px;
  border-radius: var(--block-radius);
  box-shadow: 0 4px 32px #0004;
  background: var(--block-gradient);
  display: flex;
  box-sizing: border-box;
  padding: 8px;
}

.promo-block.fluffy-block {
  overflow: hidden;
}

.promo-block.tg-block {
  background: #232b2f;
  box-shadow: 0 4px 32px #00000022;
  overflow: visible;
}

.tg-bg-container {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  z-index: 1;
}

.tg-bg-container::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('sprites/tgpromo.png') center center/cover no-repeat;
  opacity: 0.35;
  filter: grayscale(0.15) brightness(0.7) contrast(1.2);
  pointer-events: none;
  z-index: 1;
}

.promo-bg { /* Универсальный класс для фона */
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
  user-select: none;
  filter: brightness(0.85) grayscale(0.10);
}

.promo-gradient { /* Универсальный градиент */
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(34, 39, 47, 0.82) 0%, rgba(34, 39, 47, 0.4) 65%, rgba(34, 39, 47, 0.0) 100%);
  pointer-events: none;
}

.promo-content {
  position: relative;
  z-index: 3;
  padding: 10px 12px;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
}

.promo-header { /* Просто обертка. ВАЖНО! */ }

.promo-title {
  font-size: 1.21rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  text-shadow: 0 2px 12px #0007;
  color: var(--block-accent);
}

.promo-desc {
  font-size: 1.01rem;
  color: #fff;
  margin-bottom: 18px;
  text-shadow: 0 1px 8px #0006;
  font-weight: 500;
}

.promo-btn {
  display: inline-block;
  font-weight: 700;
  font-size: 1.02rem;
  padding: 9px 26px;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 2px 16px #0002;
  letter-spacing: 0.01em;
  transition: all 0.2s ease-in-out;
  background: var(--block-accent);
  color: #181b1f;
}

.promo-btn:hover,
.promo-btn:focus {
  background: var(--block-accent-hover);
  box-shadow: 0 4px 15px var(--block-accent-shadow), 0 0 25px var(--block-accent-shadow);
  transform: translateY(-2px) scale(1.03);
  outline: none;
}

.tg-top-img {
  position: absolute;
  right: 15px;
  top: -46px;
  width: 54px;
  height: 54px;
  object-fit: contain;
  z-index: 4;
  filter: drop-shadow(0 8px 16px #0005);
  pointer-events: none;
  user-select: none;
}

/*
  =================================
  === FOOTER И ПРОЧЕЕ
  =================================
*/

.links-block {
  color: var(--muted);
  font-size: 1.03rem;
  margin-bottom: 44px;
  text-align: center;
}

.site-footer {
  text-align: center;
  color: var(--muted);
  margin: 60px 0 24px 0;
  font-size: 0.97rem;
  z-index: 2;
  position: relative;
}

.footer-link {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.footer-link:hover,
.footer-link:focus {
  color: var(--accent);
  outline: none;
}

/*
  =================================
  === АНИМАЦИИ
  =================================
*/

/* Анимация появления элементов при загрузке */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Анимация появления элементов при прокрутке */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.main-text .reveal {
  transition-delay: calc(0.05s * var(--i, 0));
}

.aboutfurry-bg-img {
  position: absolute;
  width: 480px;
  height: auto;
  z-index: 1;
  filter: invert(1) brightness(1.15) drop-shadow(0 4px 24px #0008);
  opacity: 0.2;
  pointer-events: none;
  user-select: none;
}
.aboutfurry-bg-img.left { top: 120px; left: 0; }
.aboutfurry-bg-img.right { top: 50%; right: 0; transform: translateY(-50%) scaleX(-1); }

/*
  =================================
  === АДАПТИВНОСТЬ (MEDIA QUERIES)
  =================================
*/

@media (max-width: 900px) {
  .promo-row { flex-direction: column; gap: 54px; align-items: center; }
  .promo-block { width: 100%; max-width: 400px; }
}

@media (max-width: 700px) {
  header { padding: 0 10px; height: 54px; justify-content: center; }
  nav.menu { gap: 12px; }
  main { padding: 74px 12px 0 12px; }
  .site-title { font-size: 1.8rem; }
  .main-text { font-size: 1.01rem; }
  .links-block { font-size: 0.95rem; }
  .background-image { opacity: 0 !important; /* Скрываем на мобилках, чтобы не мешало */ }
  .aboutfurry-bg-img { width: 180px; opacity: 0.3; }
  .aboutfurry-bg-img.left { top: 30px; }
  .aboutfurry-bg-img.right { top: 1500px; right: 12px; transform: none; }
}

/*
  =================================
  === СВЕТЛАЯ ТЕМА
  =================================
*/

.light-theme {
  --text: #222222;
  --muted: #555555;
  --bg: #f9f9f9;
  --block-gradient: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
}

.light-theme .background-image {
    filter: grayscale(0) brightness(0.8) invert(0);
  mix-blend-mode: multiply;
}
.light-theme .aboutfurry-bg-img {
  filter: grayscale(1) brightness(0.5) invert(0);
  mix-blend-mode: multiply;
  opacity: 0.15;
}

.light-theme header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: rgba(150, 150, 150, 0.2);
}

.light-theme .menu-link { color: var(--text); }

.light-theme .menu-link:hover,
.light-theme .menu-link:focus {
  color: var(--accent);
  text-shadow: none;
}

.light-theme .promo-block.fluffy-block,
.light-theme .promo-block.tg-block {
  box-shadow: 0 6px 32px rgba(0, 0, 0, 0.15);
}

.light-theme .promo-block .promo-title {
  text-shadow: 0 0 10px var(--block-accent);
}

.light-theme .tg-top-img { filter: drop-shadow(0 4px 12px #0003); }