@font-face {
  font-family: "Onest";
  src: url("../assets/fonts/Onest-VariableFont_wght.ttf") format("truetype-variations"),
       url("../assets/fonts/Onest-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-bg: #181818;
  --color-text: #f7f7f7;
  --color-main: #ff9bfe;
  --color-main-2: #a9fac4;
  --color-muted: #8f8f8f;
  --radius-card: 20px;
  --max-width: 1120px;

  --glass-fill: rgba(247, 247, 247, 0.2);
  --glass-fill-pink: rgba(255, 155, 254, 0.3);
  --glass-blur: 12px;
  --glass-shadow: 0 2px 8px 0 rgba(79, 70, 229, 0.08);
  --glass-edge: inset 1px 1px 1px 0 rgba(255, 255, 255, 0.45),
                inset -1px -1px 1px 0 rgba(255, 255, 255, 0.12);
}

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

html { background: var(--color-bg); }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: "Onest", system-ui, sans-serif;
  font-weight: 300;
  overflow-x: clip;
  touch-action: manipulation;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ============ Шапка ============ */

.header {
  position: fixed;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: min(var(--max-width), calc(100% - 80px));
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header__nav {
  background: var(--glass-fill);
  border-radius: 999px;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--glass-shadow), var(--glass-edge);
  padding: 4px;
}

.header__nav-list { display: flex; gap: 8px; }

.header__nav-link {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  transition: background 0.15s ease, opacity 0.2s ease;
}

a.header__nav-link:hover { background: rgba(247, 247, 247, 0.15); }
a.header__nav-link:focus-visible { outline: 2px solid var(--color-main); outline-offset: 2px; }
.header__nav-link--current { color: var(--color-main); cursor: default; }

/* «Soon...» — обводка в половину силы */
.header__nav-link--soon {
  color: var(--color-main);
  box-shadow: inset 0 0 0 1.5px var(--color-main);
  opacity: 0.5;
}

a.header__nav-link--soon:hover { opacity: 0.8; background: transparent; }

.header__right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 600;
  font-size: 18px;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}

.btn--glass {
  background: var(--glass-fill);
  color: var(--color-text);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--glass-shadow), var(--glass-edge);
}

.btn--pink { background: var(--color-main); color: #09070a; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: 2px solid var(--color-text); outline-offset: 3px; }
.btn__icon { width: 24px; height: 24px; flex-shrink: 0; transform: rotate(-90deg); }

.header__cta { flex-shrink: 0; }
.header__cta-short { display: none; }
.header__back-short { display: none; }

.header__galya { width: 52px; padding: 0; display: grid; place-items: center; }
.header__galya img { width: 30px; height: 30px; transition: transform 0.3s cubic-bezier(0.3, 1.5, 0.5, 1); }
.header__galya:hover { background: var(--glass-fill-pink); }
.header__galya:hover img { transform: scale(1.18) rotate(-8deg); }

/* ============ Страница ============ */

.dz {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 150px 40px 100px;
  display: flex;
  flex-direction: column;
  gap: 80px;
}

/* ---------- Герой ---------- */

.dz__hero {
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
  align-items: center;
  gap: 40px;
}

.dz__bf img { width: 100%; }

/* Еле заметный взмах: бабочка на картинке плоская, поэтому «машет»
   лёгким сжатием по горизонтали — сильнее выглядело бы как глюк. */
.dz__bf img { animation: dz-flap 3.2s ease-in-out infinite; transform-origin: 50% 55%; }

@keyframes dz-flap {
  0%, 100% { transform: scaleX(1)    translateY(0); }
  50%      { transform: scaleX(0.94) translateY(-6px); }
}

.dz__card-pink {
  background: var(--color-main);
  color: #16111a;
  border-radius: var(--radius-card);
  padding: 40px;
  min-height: 240px;
  display: flex;
  align-items: center;
  font-weight: 400;
  font-size: 20px;
  line-height: 1.5;
}

/* ---------- Блоки ---------- */

.dz__block { display: flex; flex-direction: column; gap: 24px; }

.dz__heading {
  font-weight: 600;
  font-size: 24px;
  color: var(--color-main);
}

/* ---------- Лента мемов ---------- */
/* Едет сама, но её можно схватить и пролистать: внутри обычная
   горизонтальная прокрутка, а скрипт лишь подталкивает её. */

.dz__marquee {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  /* вылезаем за поля страницы, чтобы лента шла от края до края */
  margin: 0 calc(50% - 50vw);
  padding: 0 calc(50vw - 50% + 0px);
}

.dz__marquee::-webkit-scrollbar { display: none; }

.dz__track { display: flex; gap: 20px; width: max-content; }

.dz__meme {
  flex: 0 0 auto;
  width: 380px;
  border-radius: 16px;
  overflow: hidden;
  background: #0f0f0f;
}

.dz__meme img { width: 100%; height: auto; }

/* ---------- Карточки форматов ---------- */

.dz__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.dz__card {
  background: var(--color-main-2);
  color: var(--color-bg);
  border-radius: 16px;
  padding: 28px 24px;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.25s ease;
}

.dz__card:hover { transform: scale(1.03); }

/* Текст вместо мемов — в блоке «В каком формате работаем» */
.dz__text {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 860px;
  font-weight: 300;
  font-size: 22px;
  line-height: 1.45;
  color: var(--color-text);
}

.dz__card-title { font-weight: 600; font-size: 20px; }
.dz__card-note { font-weight: 300; font-size: 17px; }

/* ---------- Призыв ---------- */

.dz__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding: 40px;
  border-radius: var(--radius-card);
  background: var(--glass-fill);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--glass-shadow), var(--glass-edge);
}

.dz__cta-text { font-weight: 700; font-size: 28px; }

/* ============ Подвал ============ */

.dz-footer {
  flex-shrink: 0;
  background: var(--color-bg);
  padding: 80px 40px 20px;
}

.dz-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.dz-footer__title { font-weight: 700; font-size: 24px; }
.dz-footer__socials { display: flex; gap: 20px; }

.dz-footer__social {
  width: 64px;
  height: 64px;
  border-radius: 9999px;
  overflow: hidden;
  transition: transform 0.2s ease, filter 0.2s ease;
}

a.dz-footer__social:hover { transform: translateY(-4px) scale(1.06); filter: brightness(1.12); }
span.dz-footer__social { cursor: default; }
span.dz-footer__social:hover { transform: none; filter: none; }
.dz-footer__social img { width: 100%; height: 100%; object-fit: cover; }

.dz-footer__legal {
  max-width: var(--max-width);
  margin: 40px auto 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-weight: 300;
  font-size: 12px;
}

/* ============ Телефон ============ */

@media (max-width: 900px) {
  .header { top: 16px; width: calc(100% - 32px); gap: 12px; }
  .header__nav { display: none; }
  .header__back-short { display: inline-flex; height: 46px; padding: 0 18px; font-size: 15px; }
  .header__cta { height: 46px; padding: 0 18px; font-size: 15px; }
  .header__cta-long { display: none; }
  .header__cta-short { display: inline; }
  .header__galya img { width: 27px; height: 27px; }

  .dz { padding: 100px 20px 60px; gap: 56px; }

  .dz__hero { grid-template-columns: minmax(0, 1fr); gap: 24px; justify-items: center; text-align: center; }
  .dz__bf { width: min(60%, 240px); }
  .dz__card-pink { padding: 28px 24px; min-height: 0; font-size: 17px; text-align: center; }

  .dz__heading { font-size: 20px; }
  .dz__text { font-size: 17px; gap: 10px; }
  .dz__meme { width: 280px; }
  .dz__cards { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
  .dz__card { padding: 20px 18px; min-height: 130px; }
  .dz__card-title { font-size: 17px; }
  .dz__card-note { font-size: 15px; }

  .dz__cta { padding: 28px 24px; flex-direction: column; text-align: center; }
  .dz__cta-text { font-size: 22px; }

  .dz-footer { padding: 56px 20px 20px; }
  .dz-footer__social { width: 52px; height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  .dz__bf img { animation: none; }
  .btn, .dz__card, .dz-footer__social, .header__galya img { transition: none; }
  .btn:hover, .dz__card:hover { transform: none; }
}
