/* ===== Стиль как у modrinth.com/app ===== */

/* ===== Шрифт Nekst ===== */
@font-face {
  font-family: 'Nekst';
  src: url('/client/assets/fonts/Nekst-Thin.ttf') format('truetype');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nekst';
  src: url('/client/assets/fonts/Nekst-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nekst';
  src: url('/client/assets/fonts/Nekst-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nekst';
  src: url('/client/assets/fonts/Nekst-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nekst';
  src: url('/client/assets/fonts/Nekst-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nekst';
  src: url('/client/assets/fonts/Nekst-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nekst';
  src: url('/client/assets/fonts/Nekst-Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-bg: #141920;
  --color-raised-bg: #1e2630;
  --color-button-bg: #2a3340;
  --color-button-bg-hover: #364153;
  --color-divider: #2a3340;
  --color-brand: #70addf;
  --color-brand-hover: #8bc0ea;
  --color-brand-highlight: rgba(112, 173, 223, 0.25);
  --color-brand-bg: rgba(112, 173, 223, 0.18);
  --color-text: #b0bac5;
  --color-text-secondary: #96a2b0;
  --color-text-inactive: #7f8996;
  --color-contrast: #ffffff;
  --color-heading: #c4cfdd;
  --color-link: #70addf;
  --color-danger: #ff496e;
  --brand-gradient-bg: linear-gradient(
    135deg,
    rgba(112, 173, 223, 0.14) 0%,
    rgba(112, 173, 223, 0.05) 45%,
    rgba(20, 25, 32, 0) 100%
  );
  --brand-gradient-border: rgba(112, 173, 223, 0.2);
  --news-max: 56rem;
  --radius-sm: 8px;
  --radius-md: 8px;
  --radius-lg: 8px;
  --radius-xl: 8px;
  --radius-media: 3px;
  --max: 1280px;
  --nav-h: 3.5rem;
  --font: 'Nekst', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-weight: 400;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

/* ===== Кастомный скроллбар (сайт /client) ===== */

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

*::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.28);
  border: 4px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: #fff;
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

.container {
  width: min(var(--max), calc(100% - 2.5rem));
  margin-inline: auto;
}

/* ===== Навигация ===== */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(20, 25, 32, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  overflow: visible;
}

.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  color: var(--color-contrast);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.brand img {
  height: 1.35rem;
  width: auto;
  display: block;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-right: auto;
}

.nav__links a {
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-sm);
  color: var(--color-contrast);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav__links a:hover {
  background: rgba(255, 255, 255, 0.04);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-left: auto;
  flex-shrink: 0;
}

@media (min-width: 961px) {
  .nav-drawer {
    display: none !important;
  }
}

.nav__burger {
  display: none;
  width: 2.35rem;
  height: 2.35rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav__burger:hover {
  background: rgba(255, 255, 255, 0.04);
}

.nav__burger span {
  display: block;
  width: 1.1rem;
  height: 1.5px;
  border-radius: 2px;
  background: var(--color-contrast);
  transition: transform 0.2s, opacity 0.2s;
}

.nav-open .nav__burger span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-open .nav__burger span:nth-child(2) {
  opacity: 0;
}

.nav-open .nav__burger span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.nav-drawer {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--nav-h);
  z-index: 60;
  max-height: calc(100dvh - var(--nav-h));
  overflow: auto;
  padding: 0.5rem 0 1rem;
  background: rgba(20, 25, 32, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-divider);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-0.6rem);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease,
    visibility 0.22s ease;
}

.nav-drawer:not(.is-open) {
  content-visibility: hidden;
}

.nav-drawer.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  content-visibility: visible;
}

.nav-open .nav {
  border-bottom-color: var(--color-divider);
  background: rgba(20, 25, 32, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-drawer__inner {
  display: grid;
  gap: 0.15rem;
}

.nav-drawer__inner > a:not(.btn) {
  display: block;
  padding: 0.7rem 0.65rem;
  border-radius: var(--radius-sm);
  color: var(--color-contrast);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-drawer__inner > a:not(.btn):hover {
  background: rgba(255, 255, 255, 0.04);
}

.nav-drawer__inner .btn {
  margin-top: 0.5rem;
  width: 100%;
  justify-content: center;
  border-radius: 12px;
}

/* Блокировка скролла без прыжка страницы вверх */
body.nav-open {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
}

body.nav-open .nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .nav-drawer {
    transition: none;
  }
}

/* ===== Переключатель языка ===== */

.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem;
  border-radius: 10px;
  background: var(--color-button-bg);
  gap: 0.1rem;
}

.lang-switch__btn {
  min-width: 2.1rem;
  padding: 0.35rem 0.5rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text-secondary);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.lang-switch__btn:hover {
  color: var(--color-contrast);
}

.lang-switch__btn.is-active {
  background: var(--color-brand);
  color: #0d1218;
}

/* ===== Кнопки ===== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s, background 0.15s;
  white-space: nowrap;
  line-height: 1.2;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn--primary {
  background: var(--color-brand);
  color: #000;
}

.btn--primary:hover:not(:disabled) {
  filter: brightness(1.08);
}

.btn--ghost {
  background: transparent;
  color: var(--color-brand);
  font-weight: 600;
}

.btn--ghost:hover {
  filter: brightness(1.15);
}

.btn--secondary {
  background: var(--color-button-bg);
  color: var(--color-contrast);
}

.btn--secondary:hover:not(:disabled) {
  background: var(--color-button-bg-hover);
}

.btn--lg {
  padding: 0.85rem 1.35rem;
  border-radius: 14px;
  font-size: 1.05rem;
}

.btn__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: block;
}

/* На брендовой кнопке иконка загрузки — чёрная (как текст) */
.btn--primary .btn__icon {
  filter: brightness(0);
}

/* ===== Hero ===== */

.hero {
  position: relative;
  z-index: 2;
  padding: 4.5rem 0 5rem;
  text-align: center;
  overflow-x: clip;
  overflow-y: visible;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: var(--color-bg);
  pointer-events: none;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--color-brand-bg);
  color: var(--color-brand);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.version-label {
  margin: -0.5rem 0 2.5rem;
  color: var(--color-text-inactive);
  font-size: 0.95rem;
  font-weight: 500;
}

.hero__counter {
  margin: -1.75rem 0 0.75rem;
  color: var(--color-brand);
  font-size: 0.95rem;
  font-weight: 600;
}

.hero__counter[hidden] {
  display: none;
}

.version-label[hidden] {
  display: none;
}

.badge__version:not(:empty)::before {
  content: '·';
  margin-right: 0.35rem;
  opacity: 0.7;
}

.platform__version {
  margin-top: 0.45rem;
  font-size: 0.85rem;
  color: var(--color-brand);
  font-weight: 600;
}

.platform__version:empty {
  display: none;
}

.hero h1 {
  margin: 0 auto 1rem;
  max-width: 18ch;
  font-size: clamp(2.75rem, 7vw, 5.25rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 700;
  color: var(--color-contrast);
}

.hero__lead {
  margin: 0 auto 1.75rem;
  max-width: 42rem;
  color: var(--color-text-secondary);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 500;
  line-height: 1.4;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.hero__app {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}

/* ===== Мягкое свечение под скриншотом ===== */

.hero__glow {
  position: absolute;
  inset: 12% 0 -22%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  filter: blur(48px);
}

.hero__glow span {
  position: absolute;
  display: block;
  border-radius: 50%;
  will-change: transform, opacity;
}

.hero__glow span:nth-child(1) {
  width: 55%;
  height: 70%;
  left: 5%;
  top: 10%;
  background: rgba(112, 173, 223, 0.35);
  animation: heroGlowA 9s ease-in-out infinite;
}

.hero__glow span:nth-child(2) {
  width: 50%;
  height: 65%;
  right: 0;
  top: 20%;
  background: rgba(112, 173, 223, 0.22);
  animation: heroGlowB 11s ease-in-out infinite;
}

.hero__glow span:nth-child(3) {
  width: 40%;
  height: 45%;
  left: 30%;
  bottom: 0;
  background: rgba(90, 140, 190, 0.2);
  animation: heroGlowC 8s ease-in-out infinite;
}

@keyframes heroGlowA {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.7; }
  50% { transform: translate(8%, 6%) scale(1.12); opacity: 1; }
}

@keyframes heroGlowB {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.55; }
  50% { transform: translate(-10%, -4%) scale(1.15); opacity: 0.9; }
}

@keyframes heroGlowC {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.45; }
  50% { transform: translate(4%, -10%) scale(1.2); opacity: 0.8; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__glow span {
    animation: none;
  }
}

.hero__window {
  position: relative;
  z-index: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  line-height: 0;
  background: transparent;
}

.hero__window img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== Секции ===== */

.section {
  position: relative;
  z-index: 1;
  padding: 5rem 0;
}

.section__title {
  margin: 0 0 3rem;
  text-align: center;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-contrast);
  line-height: 1.15;
}

.feature {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 4.5rem;
}

.feature:last-child {
  margin-bottom: 0;
}

.feature--flip {
  grid-template-columns: 1.15fr 1fr;
}

.feature--flip .feature__text {
  order: 2;
}

.feature h3 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 2.5vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-contrast);
}

.feature p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 1.1rem;
  line-height: 1.55;
  max-width: 36ch;
}

.feature__media {
  border-radius: var(--radius-media);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  line-height: 0;
  background: transparent;
}

.feature__media img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== Три колонки преимуществ ===== */

.perks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--color-divider);
}

.perk h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-contrast);
}

.perk p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 0.98rem;
}

.perk a {
  color: var(--color-brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.perk__icon {
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.85rem;
  color: var(--color-contrast);
}

/* ===== Скачивание ===== */

.download {
  text-align: center;
  background: #10161d;
}

.download__sub {
  margin: -2rem auto 2.5rem;
  max-width: 36rem;
  color: var(--color-text-secondary);
}

.download__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.platform {
  padding: 2.25rem 1.5rem;
  border-radius: 24px;
  border: none;
  background: rgba(255, 255, 255, 0.03);
}

.platform__icon {
  width: 2.75rem;
  height: 2.75rem;
  margin: 0 auto 0.85rem;
  object-fit: contain;
  display: block;
}

.platform h3 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-contrast);
}

.platform .btn {
  min-width: 10rem;
}

.platform__note {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--color-text-inactive);
}

.download__legal {
  margin: 1.5rem auto 0;
  max-width: 40rem;
  font-size: 0.9rem;
  color: var(--color-text-inactive);
}

.download__legal a {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ===== Модальное окно загрузки (минимализм сайта) ===== */

body.modal-open {
  overflow: hidden;
}

@keyframes download-modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.download-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.download-modal[hidden] {
  display: none;
}

.download-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  animation: download-modal-fade 0.12s ease;
}

.download-modal__panel {
  position: relative;
  width: min(100%, 24rem);
  padding: 1.35rem 1.35rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-divider);
  background: var(--color-raised-bg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  animation: download-modal-fade 0.12s ease;
}

.download-modal__close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--color-button-bg);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.download-modal__close:hover {
  background: var(--color-button-bg-hover);
  color: var(--color-contrast);
}

.download-modal__header {
  padding-right: 2rem;
  margin-bottom: 1.1rem;
}

.download-modal__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.65rem;
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--color-text-inactive);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
}

.download-modal__eyebrow img {
  width: 14px;
  height: 14px;
  opacity: 0.7;
  filter: brightness(0) invert(1);
}

.download-modal__title {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-contrast);
  letter-spacing: -0.02em;
}

.download-modal__sub {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.45;
}

.download-modal__options {
  display: grid;
  gap: 0.5rem;
}

.download-option {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: var(--color-button-bg);
  color: inherit;
  text-decoration: none;
  transition: background 0.15s;
}

.download-option--featured {
  background: var(--color-button-bg);
}

.download-option:hover:not(.is-disabled) {
  background: var(--color-button-bg-hover);
}

.download-option.is-disabled,
.download-option:disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

.download-option__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: none;
}

.download-option__icon img {
  display: block;
  width: 18px;
  height: 18px;
}

/* Featured («Прямая загрузка») — белая иконка */
.download-option--featured .download-option__icon img {
  filter: brightness(0) invert(1);
}

.download-option__icon--muted {
  background: rgba(255, 255, 255, 0.04);
}

.download-option__icon--muted img {
  opacity: 0.85;
  filter: brightness(0) invert(1);
}

.download-option__body {
  flex: 1 1 auto;
  display: grid;
  gap: 0.1rem;
  min-width: 0;
  text-align: left;
}

.download-option__title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-contrast);
}

.download-option__hint,
.download-option__status {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  line-height: 1.35;
}

.download-option__status {
  color: var(--color-text);
}

.download-option__chevron {
  flex: 0 0 auto;
  width: 0.4rem;
  height: 0.4rem;
  margin-right: 0.1rem;
  border-top: 1.5px solid var(--color-text-inactive);
  border-right: 1.5px solid var(--color-text-inactive);
  transform: rotate(45deg);
  transition: border-color 0.15s;
}

.download-option:hover:not(.is-disabled) .download-option__chevron {
  border-color: var(--color-text);
}

/* ===== Новости (как у Modrinth) ===== */

.news-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.news-head h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-contrast);
}

.news-head a {
  color: var(--color-brand);
  font-weight: 600;
  white-space: nowrap;
}

.news-head a:hover {
  filter: brightness(1.15);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.news-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100%;
  transition: transform 0.15s ease;
}

.news-card:active {
  transform: scale(0.99);
}

.news-card:hover h3 {
  text-decoration: underline;
}

.news-card__cover {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-divider);
  background: var(--color-button-bg);
  line-height: 0;
  overflow: hidden;
}

.news-card__cover--empty,
.news-featured__placeholder {
  background: var(--color-button-bg);
}

.news-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  content-visibility: auto;
}

.news-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 1rem;
  flex: 1;
}

.news-card__body h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-contrast);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.news-card__body p {
  margin: 0;
  color: var(--color-text);
  font-size: 0.875rem;
  line-height: 1.35;
  flex: 1;
}

.news-card__meta {
  margin-top: auto;
  padding-top: 0.25rem;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
}

.news-empty,
.news-error {
  padding: 2rem;
  text-align: center;
  color: var(--color-text-secondary);
  background: var(--color-raised-bg);
  border-radius: var(--radius-lg);
}

/* ===== Анимации открытия новостей ===== */

@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 .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;
}

@media (prefers-reduced-motion: reduce) {
  .news-enter,
  .news-list--ready .news-enter,
  .news-page__header.news-enter,
  .post-page__header.news-enter,
  .post.is-ready > *,
  body.news-leaving .news-page,
  body.news-leaving .post-page {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  @view-transition {
    navigation: none;
  }
}

/* ===== Страница /news ===== */

.news-page {
  padding-bottom: 4.5rem;
}

.news-page__inner {
  max-width: var(--news-max);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.news-page__header {
  padding: 1.5rem 0 0;
}

.news-page__header h1 {
  margin: 0;
  font-size: 1.875rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-contrast);
}

.news-featured-band {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: 1.5rem;
  padding: 1rem 0;
  background: var(--brand-gradient-bg);
  border-top: 1px solid var(--brand-gradient-border);
  border-bottom: 1px solid var(--brand-gradient-border);
}

.news-featured-band__inner {
  max-width: var(--news-max);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.news-featured {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
  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;
  line-height: 0;
}

.news-featured__media img {
  width: 100%;
  height: auto;
  border-radius: 1rem;
  border: 1px solid var(--color-divider);
  display: block;
  content-visibility: auto;
}

.news-featured__placeholder {
  aspect-ratio: 16 / 9;
  width: 100%;
  min-height: 12rem;
  border-radius: 1rem;
  border: 1px solid var(--color-divider);
  display: block;
}

.news-featured__body {
  flex: 1;
  min-width: 16rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: center;
}

.news-featured__label {
  margin: 0;
  font-weight: 700;
  color: var(--color-contrast);
  font-size: 0.95rem;
}

.news-featured__body h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-contrast);
  line-height: 1.25;
}

.news-featured__summary {
  margin: 0;
  color: var(--color-text);
  font-size: 1.125rem;
  line-height: 1.35;
}

.news-more {
  margin-top: 1.5rem;
}

.news-more h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--color-contrast);
}

.news-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

/* ===== Страница статьи ===== */

.post-page {
  padding-bottom: 4.5rem;
}

.post-page__inner {
  max-width: var(--news-max);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.post-page__header {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--color-divider);
}

.post-page__news-link {
  display: inline-block;
  margin: 0;
  font-size: 1.875rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-contrast);
}

.post-page__news-link:hover {
  text-decoration: underline;
}

.post {
  max-width: none;
  margin: 0;
  padding: 1.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.post__title {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-contrast);
  line-height: 1.15;
}

.post__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
}

.post__meta-author {
  font-weight: 600;
  color: var(--color-text);
}

.post__meta-sep {
  color: var(--color-text-inactive);
}

.post__meta-mobile {
  display: none;
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
}

.post__cover {
  border-radius: var(--radius-lg);
  overflow: hidden;
  line-height: 0;
  background: transparent;
  border: 1px solid var(--color-divider);
}

.post__cover img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.post__summary {
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.4;
  margin: 0;
}

.post__content {
  color: var(--color-text);
  font-size: 0.875rem;
}

.post__content h2,
.post__content h3 {
  margin: 1.5em 0 0.5em;
  color: var(--color-contrast);
  letter-spacing: -0.02em;
}

.post__content h2 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
}

.post__content h3 {
  font-size: 1rem;
  margin-top: 1.25rem;
}

.post__content p,
.post__content ul,
.post__content ol {
  margin: 0 0 0.75em;
  line-height: 1.55;
}

.post__content a {
  color: var(--color-link);
  font-weight: 600;
}

.post__content a:hover {
  text-decoration: underline;
}

.post__content code {
  background: var(--color-button-bg);
  padding: 0.1em 0.35em;
  border-radius: 0.35rem;
  font-size: 0.92em;
}

.post__content pre {
  background: var(--color-raised-bg);
  border-radius: var(--radius-md);
  padding: 1rem;
  overflow: auto;
}

.post__content img,
.post__content video {
  max-width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-divider);
  margin: 1rem 0;
  display: block;
}

.post__content img {
  cursor: zoom-in;
}

.post__content blockquote {
  margin: 1.25rem 0;
  padding: 0.35rem 0 0.35rem 1rem;
  border-left: 3px solid var(--color-brand);
  color: var(--color-text-secondary);
}

.post__content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.95rem;
}

.post__content th,
.post__content td {
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.55rem 0.7rem;
  text-align: left;
}

.post__content th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--color-contrast);
}

.post-media {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

.post-media__item {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-button-bg);
  line-height: 0;
  border: 1px solid var(--color-divider);
}

.post-media__item--video {
  grid-column: 1 / -1;
}

.post-media__item img,
.post-media__item video {
  width: 100%;
  height: auto;
  display: block;
}

@media (min-width: 640px) {
  .post__summary {
    font-size: 1.125rem;
  }

  .post__content {
    font-size: 1rem;
  }

  .post__meta {
    font-size: 1rem;
  }

  .post__cover img {
    border-radius: 1rem;
  }

  .post__content h2 {
    font-size: 1.5rem;
  }

  .post__content h3 {
    font-size: 1.125rem;
  }
}

/* ===== Lightbox ===== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  background: rgba(0, 0, 0, 0.8);
  padding: 1.5rem;
}

.lightbox.is-open {
  display: grid;
}

.lightbox img {
  max-width: min(1100px, 100%);
  max-height: 85vh;
  border-radius: var(--radius-lg);
}

.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

/* ===== Footer ===== */

.footer {
  border-top: 1px solid var(--color-divider);
  padding: 2.5rem 0;
  background: #10161d;
}

.footer__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.footer__left {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer__logo {
  display: inline-flex;
  align-items: center;
}

.footer__logo img {
  height: 1.55rem;
  width: auto;
}

.footer__copy {
  margin: 0;
  color: var(--color-text-inactive);
  font-size: 0.875rem;
  line-height: 1.45;
}

.footer__social {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-shrink: 0;
}

.footer__social a {
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  color: var(--color-contrast);
  transition: opacity 0.15s;
}

.footer__social a:hover {
  opacity: 0.7;
}

.footer__social img {
  width: 1.45rem;
  height: 1.45rem;
  display: block;
  object-fit: contain;
}

/* ===== Адаптив: планшет ===== */

@media (max-width: 960px) {
  .container {
    width: min(var(--max), calc(100% - 2rem));
  }

  .nav__links,
  .nav__cta {
    display: none;
  }

  .nav__burger {
    display: inline-flex;
  }

  .section {
    padding: 3.5rem 0;
  }

  .section__title {
    margin-bottom: 2rem;
  }

  .feature,
  .feature--flip {
    grid-template-columns: 1fr;
    gap: 1.15rem;
    margin-bottom: 3rem;
  }

  .feature--flip .feature__text {
    order: 0;
  }

  .feature p {
    max-width: none;
    font-size: 1.05rem;
  }

  .perks {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
  }

  .download .section__title {
    font-size: clamp(1.45rem, 3.6vw, 1.85rem);
    margin-bottom: 1rem;
    line-height: 1.2;
  }

  .download__sub {
    margin: 0 auto 2rem;
  }

  .download__grid {
    grid-template-columns: 1fr;
    max-width: 420px;
  }

  .news-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .news-featured {
    flex-direction: column;
  }

  .news-featured__media {
    order: 1;
  }

  .news-featured__body {
    order: 2;
    min-width: 0;
  }

  .nav__inner {
    gap: 0.75rem;
  }

  .nav__actions {
    gap: 0.45rem;
  }

  .hero__glow {
    inset: 18% 5% -10%;
    filter: blur(36px);
  }
}

/* ===== Адаптив: телефон ===== */

@media (max-width: 640px) {
  .container {
    width: min(var(--max), calc(100% - 1.5rem));
  }

  .nav {
    height: 3.25rem;
  }

  :root {
    --nav-h: 3.25rem;
  }

  .brand img {
    height: 1.2rem;
  }

  .hero {
    padding: 2.25rem 0 2.75rem;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(2.15rem, 11vw, 3rem);
  }

  .hero__lead {
    font-size: 1rem;
    margin-bottom: 1.35rem;
  }

  .hero__cta {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .hero__cta .btn {
    width: 100%;
    justify-content: center;
  }

  .hero__app {
    margin-top: 1.75rem;
  }

  .hero__window {
    border-radius: 10px;
  }

  .badge {
    margin-bottom: 0.9rem;
    font-size: 0.8rem;
  }

  .section {
    padding: 2.75rem 0;
  }

  .section__title {
    font-size: clamp(1.55rem, 7vw, 2.1rem);
    margin-bottom: 1.5rem;
  }

  .download .section__title {
    font-size: 1.35rem;
    margin-bottom: 0.9rem;
    letter-spacing: -0.02em;
    line-height: 1.25;
  }

  .download__sub {
    margin: 0 auto 1.75rem;
    font-size: 0.95rem;
  }

  .feature {
    margin-bottom: 2.5rem;
  }

  .feature h3 {
    font-size: 1.35rem;
  }

  .platform {
    padding: 1.75rem 1.25rem;
  }

  .platform .btn {
    min-width: 0;
    width: 100%;
    justify-content: center;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .news-page__inner,
  .post-page__inner,
  .news-featured-band__inner {
    padding-inline: 1rem;
  }

  .news-page__header h1,
  .post-page__news-link {
    font-size: 1.625rem;
  }

  .news-featured__summary {
    font-size: 1rem;
  }

  .post__meta {
    display: none;
  }

  .post__meta-mobile {
    display: block;
  }

  .post__content {
    font-size: 0.875rem;
  }

  .post__content h2 {
    font-size: 1.125rem;
  }

  .post__content h3 {
    font-size: 1rem;
  }

  .post-media {
    grid-template-columns: 1fr;
  }

  .post-page {
    padding-bottom: 3.5rem;
  }

  .post {
    padding-top: 1rem;
    gap: 1rem;
  }

  .post__summary {
    font-size: 1rem;
  }

  .post__cover img {
    border-radius: var(--radius-md);
  }

  .footer {
    padding: 2rem 0;
  }

  .footer__row,
  .news-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.1rem;
  }

  .footer__social {
    gap: 1.25rem;
  }

  .footer__social a {
    width: 2.25rem;
    height: 2.25rem;
  }

  .lightbox {
    padding: 0.75rem;
  }

  .lightbox__close {
    top: 0.65rem;
    right: 0.65rem;
  }
}

/* ===== Узкие экраны ===== */

@media (max-width: 380px) {
  .lang-switch__btn {
    min-width: 1.85rem;
    padding: 0.3rem 0.35rem;
  }

  .hero h1 {
    font-size: 1.95rem;
  }
}

/* ===== Безопасные зоны (notch) ===== */

@supports (padding: max(0px)) {
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  .footer {
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
  }
}
