/* Лендинг GameSync: стекло и ритм макета SiteMakeNew, размеры меньше референса 1920. */

/* Wadik и Nekst лежат в public/fonts этого сайта. */
@font-face {
  font-family: 'Wadik';
  src: url('/fonts/Wadik.otf') format('opentype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nekst';
  src: url('/fonts/Nekst-Thin.ttf') format('truetype');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nekst';
  src: url('/fonts/Nekst-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nekst';
  src: url('/fonts/Nekst-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nekst';
  src: url('/fonts/Nekst-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nekst';
  src: url('/fonts/Nekst-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nekst';
  src: url('/fonts/Nekst-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nekst';
  src: url('/fonts/Nekst-Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #141920;
  --ink: #fff;
  --muted: rgba(255, 255, 255, 0.72);
  --line: rgba(255, 255, 255, 0.05);
  --glass: rgba(255, 255, 255, 0.15);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  --radius: 8px;
  --accent: #c4ff83;
  --page: 980px;
  --ease: 0.12s ease;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  /* 100vw у полосы новостей шире окна на вертикальный скроллбар — лишнее срезаем, полосы снизу нет */
  overflow-x: clip;
}
body {
  margin: 0;
  max-width: 100%;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Nekst', Arial, sans-serif;
  font-weight: 600;
  font-synthesis: none;
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: break-word;
}

/* ===== Скроллбар как в клиенте: бегунок 4px, без дорожки и стрелок ===== */
html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: 16px;
  height: 16px;
  background: transparent;
  -webkit-appearance: none;
}
html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
*::-webkit-scrollbar-track,
html::-webkit-scrollbar-track-piece,
body::-webkit-scrollbar-track-piece,
*::-webkit-scrollbar-track-piece {
  background: transparent;
  border: none;
  box-shadow: none;
}
html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.15);
  border: 6px solid transparent;
  background-clip: padding-box;
  border-radius: 8px;
  min-height: 36px;
}
html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
*::-webkit-scrollbar-thumb:hover,
html::-webkit-scrollbar-thumb:active,
body::-webkit-scrollbar-thumb:active,
*::-webkit-scrollbar-thumb:active {
  background-color: rgba(255, 255, 255, 0.45);
}
html::-webkit-scrollbar-corner,
body::-webkit-scrollbar-corner,
*::-webkit-scrollbar-corner {
  background: transparent;
}
::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}
/* Firefox не рисует ::-webkit-scrollbar, поэтому тонкая полоса тем же цветом */
@supports not selector(::-webkit-scrollbar) {
  html { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.28) transparent; }
}
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }

/* ===== Стекло: одна заливка, обводка и blur ===== */
.nav,
.nav__btn:not(.nav__btn--solid),
.badge--rel,
.glass,
.cta {
  background: var(--glass);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ===== Шапка ===== */
.nav {
  position: fixed;
  z-index: 20;
  top: 14px;
  left: 50%;
  width: min(720px, calc(100% - 28px));
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 0 16px;
  border-radius: var(--radius);
  transform: translateX(-50%);
}
.nav__logo {
  font-family: 'Wadik', 'Nekst', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.nav__actions { display: flex; gap: 6px; }
.nav__btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  transition: background var(--ease);
}
.nav__btn.nav__btn--solid {
  background: #fff;
  color: #111;
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.nav__btn:hover { background: rgba(255, 255, 255, 0.24); }
.nav__btn.nav__btn--solid:hover { background: #f2f2f2; }
.nav__btn img, .btn img, .foot__tg img { display: block; }
.nav__back {
  height: 34px;
  margin: 0;
  padding: 0 12px;
  font-size: 14px;
}

/* ===== HelloHeader ===== */
.hello {
  position: relative;
  min-height: 460px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 108px 20px 54px;
  overflow: hidden;
  background: #0a0c10;
}
.hello__stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
#hello-wave {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.hello__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 26%;
  background: linear-gradient(180deg, rgba(20, 25, 32, 0) 0%, var(--bg) 88%);
}
.hello__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: rise 0.2s ease both;
}
.hello h1 {
  margin: 0;
  font-family: 'Wadik', 'Nekst', sans-serif;
  font-size: clamp(42px, 6.4vw, 72px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(92deg, rgba(255, 255, 255, 0.92) 20%, rgba(255, 255, 255, 0.45) 55%, rgba(255, 255, 255, 0.72) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hello__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
}
.badge--ver { background: var(--accent); color: rgba(0, 0, 0, 0.85); }
.badge--rel { color: #fff; }
.btn {
  margin-top: 18px;
  height: 40px;
  padding: 0 16px 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius);
  background: #fff;
  color: #111;
  font-size: 17px;
  font-weight: 700;
  transition: background var(--ease);
}
.btn:hover { background: #f3f3f3; }
.btn:active { transform: scale(0.98); }
.nav .nav__back { margin-top: 0; height: 34px; padding: 0 12px; font-size: 14px; }

/* ===== Функции ===== */
.features, .news, .cta { width: min(var(--page), calc(100% - 32px)); margin: 0 auto; }
.features { padding-top: 28px; }
.features h2, .news h2 {
  margin: 0 0 28px;
  text-align: center;
  font-family: 'Nekst', sans-serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
}
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 28px;
  align-items: center;
  margin-bottom: 48px;
}
.feature--flip { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.feature--flip .feature__copy { order: 2; }
.feature h3 {
  margin: 0 0 8px;
  font-family: 'Nekst', sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
}
.feature p { margin: 0 0 8px; color: var(--muted); font-size: 14px; }

.shot {
  margin: 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #1e2630;
  overflow: hidden;
  transition: border-color var(--ease);
}
.shot img { display: block; width: 100%; height: auto; }
.feature:hover .shot { border-color: rgba(255, 255, 255, 0.16); }

/* ===== Новости на главной ===== */
.news { padding: 8px 0 12px; }
.glass { border-radius: var(--radius); }
.news-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.news-head h2 { margin: 0; }
.news-head a { color: var(--accent); font-size: 14px; font-weight: 600; }
.news-head a:hover { text-decoration: underline; }
.home-news .news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.home-news .news-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  color: inherit;
  text-align: left;
  transition: border-color var(--ease), background var(--ease), transform 0.15s ease;
}
.home-news .news-card:hover { border-color: rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.2); }
.home-news .news-card:active { transform: scale(0.99); }
.home-news .news-card__cover {
  aspect-ratio: 16 / 9;
  background: #1e2630;
  overflow: hidden;
}
.home-news .news-card__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-news .news-card__body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; }
.home-news .news-card h3 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.3; }
.home-news .news-card:hover h3 { text-decoration: underline; }
.home-news .news-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-news .news-card time { color: rgba(255, 255, 255, 0.45); font-size: 13px; font-weight: 600; }
.news-status, .news-empty, .news-error {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

/* ===== Страницы списка и поста ===== */
.news-page, .post-page { padding: 88px 0 56px; }
.news-page { container-type: inline-size; }
.news-page__inner, .post-page__inner {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
}
.news-page__header { padding: 8px 0 0; }
.news-page__header h1, .post-page__news-link {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.15;
}
.post-page__header { padding: 8px 0 16px; border-bottom: 1px solid var(--line); }
.post-page__news-link { display: inline-block; }
.post-page__news-link:hover { text-decoration: underline; }
.news-featured-band {
  /* Ширина контейнера страницы, не 100vw: 100vw шире окна на вертикальный скроллбар и рисует полосу снизу. */
  width: 100cqi;
  margin: 18px 0 0 calc(50% - 50cqi);
  padding: 16px 0;
  background: rgba(255, 255, 255, 0.04);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.news-featured-band__inner {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
}
.news-featured {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: inherit;
  transition: transform 0.15s ease;
}
.news-featured:active { transform: scale(0.99); }
.news-featured:hover h2 { text-decoration: underline; }
.news-featured__media { flex: 1; min-width: 0; }
.news-featured__media img, .news-featured__placeholder {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  display: block;
  background: #1e2630;
}
.news-featured__media img { height: auto; }
.news-featured__placeholder { aspect-ratio: 16 / 9; }
.news-featured__body {
  flex: 1;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}
.news-featured__label { margin: 0; font-size: 14px; font-weight: 600; }
.news-featured__body h2 { margin: 0; font-size: clamp(24px, 3vw, 30px); font-weight: 600; line-height: 1.2; }
.news-featured__summary { margin: 0; color: var(--muted); font-size: 16px; font-weight: 600; line-height: 1.35; }
.news-more { margin-top: 22px; }
.news-more h2 { margin: 0 0 14px; font-size: 20px; font-weight: 600; text-align: left; }
.news-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 14px;
}
.news-page .news-card { display: flex; flex-direction: column; color: inherit; transition: transform 0.15s ease; }
.news-page .news-card:active { transform: scale(0.99); }
.news-page .news-card:hover h3 { text-decoration: underline; }
.news-page .news-card__cover {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #1e2630;
  overflow: hidden;
}
.news-page .news-card__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-page .news-card__body { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; }
.news-page .news-card h3 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.3; }
.news-page .news-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
.news-card__meta { color: rgba(255, 255, 255, 0.45); font-size: 13px; font-weight: 600; }
.post { display: flex; flex-direction: column; gap: 14px; padding-top: 18px; }
.post__title { margin: 0; font-size: clamp(26px, 4vw, 36px); font-weight: 600; line-height: 1.15; }
.post__summary { margin: 0; color: var(--muted); font-size: 16px; font-weight: 600; line-height: 1.4; }
.post__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: rgba(255, 255, 255, 0.45); font-size: 14px; }
.post__meta-author { color: #fff; font-weight: 600; }
.post__meta-mobile { display: none; margin: 0; color: rgba(255, 255, 255, 0.45); font-size: 14px; }
.post__cover { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #1e2630; }
.post__cover img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.post__content { color: var(--muted); font-size: 15px; font-weight: 600; line-height: 1.5; min-width: 0; }
.post__content pre { max-width: 100%; overflow-x: auto; }
.post__content h2, .post__content h3, .post__content h4 { margin: 1.2em 0 0.4em; color: #fff; font-weight: 600; }
.post__content h2 { font-size: 20px; }
.post__content h3, .post__content h4 { font-size: 17px; }
.post__content p, .post__content ul, .post__content ol { margin: 0 0 0.75em; }
.post__content ul, .post__content ol { padding-left: 18px; }
.post__content a { text-decoration: underline; }
.post__content img { max-width: 100%; border-radius: var(--radius); border: 1px solid var(--line); margin: 12px 0; cursor: zoom-in; }

@keyframes news-enter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes news-leave {
  from { opacity: 1; }
  to { opacity: 0; }
}
.news-enter { opacity: 0; }
.news-list--ready .news-enter,
.news-page__header.news-enter,
.post-page__header.news-enter { animation: news-enter 0.32s ease both; }
.news-list--ready .news-featured-band.news-enter { animation-delay: 0.04s; }
.news-list--ready .news-more.news-enter { animation-delay: 0.08s; }
.news-list--ready .news-cards-grid .news-card.news-enter:nth-child(1) { animation-delay: 0.12s; }
.news-list--ready .news-cards-grid .news-card.news-enter:nth-child(2) { animation-delay: 0.16s; }
.news-list--ready .news-cards-grid .news-card.news-enter:nth-child(3) { animation-delay: 0.2s; }
.news-list--ready .news-cards-grid .news-card.news-enter:nth-child(4) { animation-delay: 0.24s; }
.news-list--ready .news-cards-grid .news-card.news-enter:nth-child(5) { animation-delay: 0.28s; }
.news-list--ready .news-cards-grid .news-card.news-enter:nth-child(n+6) { animation-delay: 0.32s; }
.post.is-ready > * { animation: news-enter 0.3s ease both; }
.post.is-ready > *:nth-child(1) { animation-delay: 0.02s; }
.post.is-ready > *:nth-child(2) { animation-delay: 0.06s; }
.post.is-ready > *:nth-child(3) { animation-delay: 0.1s; }
.post.is-ready > *:nth-child(4) { animation-delay: 0.14s; }
.post.is-ready > *:nth-child(5) { animation-delay: 0.18s; }
.post.is-ready > *:nth-child(n+6) { animation-delay: 0.22s; }
body.news-leaving .home-news,
body.news-leaving .news-page,
body.news-leaving .post-page { animation: news-leave 0.15s ease both; }
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.22s;
  animation-timing-function: ease;
}

.cta {
  margin-top: 28px;
  margin-bottom: 36px;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-radius: var(--radius);
}
.cta p {
  margin: 0 0 4px;
  max-width: 520px;
  font-size: 18px;
  line-height: 1.35;
}

.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(var(--page), calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 max(28px, env(safe-area-inset-bottom));
}
.foot__logo {
  font-family: 'Wadik', 'Nekst', sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 14px;
}
.foot p { margin: 4px 0 0; color: rgba(255, 255, 255, 0.45); font-size: 13px; }
.foot__tg {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  line-height: 0;
  opacity: 0.72;
  transition: opacity var(--ease);
}
.foot__tg:hover { opacity: 1; }

.reveal {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.reveal.is-in { opacity: 1; transform: none; }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 800px) {
  .feature, .feature--flip { grid-template-columns: 1fr; gap: 14px; margin-bottom: 36px; }
  .feature--flip .feature__copy { order: 0; }
  .hello { min-height: 300px; padding: 96px 16px 40px; }
  .hello h1 { font-size: clamp(36px, 12vw, 56px); }
  .features h2, .news h2 { font-size: 18px; margin-bottom: 20px; }
  .cta { padding: 22px 16px; }
  .cta p { font-size: 16px; }
  .home-news .news-grid { grid-template-columns: 1fr; }
  .news-head { align-items: center; }
  .news-page, .post-page { padding-top: 80px; }
  .news-page__header h1, .post-page__news-link { font-size: 26px; }
  .news-featured { flex-direction: column; }
  .news-featured__body { min-width: 0; }
  .news-featured__summary { font-size: 15px; }
  .news-cards-grid { grid-template-columns: 1fr; }
  .post__meta { display: none; }
  .post__meta-mobile { display: block; }
  .post__title { font-size: 26px; }
}

@media (max-width: 520px) {
  .nav {
    top: 8px;
    height: 46px;
    width: calc(100% - 16px);
    padding: 0 6px 0 12px;
  }
  .nav__logo { font-size: 13px; }
  .nav__btn { width: 32px; height: 32px; }
  .nav .nav__back {
    max-width: 46vw;
    padding: 0 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .features, .news, .cta, .foot,
  .news-page__inner, .post-page__inner,
  .news-featured-band__inner {
    width: min(var(--page), calc(100% - 20px));
  }
  .btn { height: 40px; font-size: 16px; }
  .foot { align-items: flex-start; gap: 12px; }
  .foot p { font-size: 12px; }
  .news-featured__body h2 { font-size: 22px; }
  .post__content { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal, .news-enter { opacity: 1; transform: none; }
  @view-transition { navigation: none; }
}
