/* Сайт Pulse: тёмный и спокойный, как само приложение. Главное — скриншоты и кнопка «Скачать» */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/onest-cyrillic-wght-normal.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/onest-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #0b0b0d;
  --text: #ededf0;
  --text-2: #a3a3ad;
  --text-3: #74747f;
  --line: rgb(255 255 255 / 0.08);
  --surface: rgb(255 255 255 / 0.04);
  --accent: #f4f4f6;
  --accent-ink: #0e0e10;
  --radius: 16px;
  --wrap: 1180px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 'Onest', 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

h1,
h2 {
  margin: 0;
  letter-spacing: -0.025em;
  line-height: 1.08;
  font-weight: 750;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.wrap {
  width: min(var(--wrap), 100% - 40px);
  margin-inline: auto;
}

:focus-visible {
  outline: 2px solid rgb(255 255 255 / 0.6);
  outline-offset: 3px;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.08);
  font-weight: 650;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.18s ease, transform 0.18s ease;
}
.btn:hover {
  background: rgb(255 255 255 / 0.14);
}
.btn:active {
  transform: scale(0.97);
}
.btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn.primary:hover {
  background: #fff;
}
.btn.small {
  height: 38px;
  padding: 0 18px;
  font-size: 14.5px;
}

/* ---------- Шапка ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(11 11 13 / 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.top-row {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  font-size: 19px;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand img {
  border-radius: 8px;
}
.top-nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
  font-size: 15px;
}
.top-nav a {
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.18s ease;
}
.top-nav a:hover {
  color: var(--text);
}

/* ---------- Первый экран ---------- */
.hero {
  padding-top: clamp(56px, 9vw, 112px);
  text-align: center;
}
.hero h1 {
  max-width: 15ch;
  margin-inline: auto;
  font-size: clamp(40px, 6.4vw, 76px);
}
.lead {
  max-width: 38em;
  margin: 22px auto 0;
  color: var(--text-2);
  font-size: clamp(17px, 1.6vw, 19px);
}
.lead.small {
  margin-top: 8px;
  font-size: 16px;
}
.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
}
.meta {
  color: var(--text-3);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

/* Скриншот в рамке окна: тонкая кромка и глубокая тень — без свечения */
.shot {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: #111114;
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 0.09),
    0 30px 80px rgb(0 0 0 / 0.55),
    0 8px 24px rgb(0 0 0 / 0.35);
}
.hero-shot {
  margin-top: clamp(48px, 7vw, 80px);
}

/* Значки площадок над заголовком */
.sources {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 26px;
}
.src {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.src svg {
  width: 22px;
  height: 22px;
}
.src.spotify svg {
  fill: #1ed760;
}
.src.soundcloud svg {
  fill: #ff5500;
}
.src.youtube svg {
  fill: #ff0033;
}

/* ---------- Возможности: карточки с кусочком скриншота ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: clamp(96px, 12vw, 150px);
  scroll-margin-top: 88px;
}
.feature {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.feature-text {
  padding: clamp(26px, 3.4vw, 40px) clamp(24px, 3.4vw, 40px) 0;
}
.feature h2 {
  font-size: clamp(24px, 2.5vw, 32px);
}
.feature p {
  max-width: 30em;
  margin-top: 10px;
  color: var(--text-2);
}
.feature-art {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: clamp(24px, 3vw, 36px) 0 0 clamp(24px, 3.4vw, 40px);
  overflow: hidden;
  border-top-left-radius: 14px;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08);
  aspect-ratio: 4 / 3;
  background: #141417;
}
.feature-art img {
  position: absolute;
  max-width: none;
}
.feature.wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
}
.feature.wide .feature-text {
  align-self: center;
  padding-bottom: clamp(26px, 3.4vw, 40px);
}
.feature.wide .feature-art {
  aspect-ratio: 16 / 9;
}
/* Кадрирование: у плейлиста — список треков с разными площадками, у текста — строки песни */
.art-playlist img {
  width: 128%;
  left: -26%;
  top: -24%;
}
/* Большой блок с видео: текст сверху, ролик на всю ширину */
.feature.showcase {
  grid-column: 1 / -1;
}
.video-shot {
  margin: clamp(24px, 3vw, 36px) clamp(24px, 3.4vw, 40px) clamp(24px, 3.4vw, 40px);
  aspect-ratio: 16 / 10;
}
.video-shot {
  position: relative;
}
.video-shot video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Пауза ролика: маленькая круглая кнопка в углу, заметнее при наведении */
.video-toggle {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgb(0 0 0 / 0.45);
  opacity: 0.6;
  cursor: pointer;
  transition: opacity 0.2s;
}
.video-shot:hover .video-toggle,
.video-toggle:focus-visible {
  opacity: 1;
}
.video-toggle .i-play,
.video-toggle.paused .i-pause {
  display: none;
}
.video-toggle.paused .i-play {
  display: block;
}
/* «или с GitHub» — тихая ссылка под кнопкой скачивания */
.alt-download {
  color: inherit;
  opacity: 0.6;
  font-size: 0.9em;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.alt-download:hover {
  opacity: 1;
}

/* ---------- Что ещё умеет ---------- */
.more {
  margin-top: 20px;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: clamp(24px, 3vw, 32px);
  list-style: none;
  border-radius: 24px;
  box-shadow: inset 0 0 0 1px var(--line);
}
.tags li {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 15px;
  white-space: nowrap;
}

/* ---------- Скачать ---------- */
.download {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: clamp(96px, 12vw, 150px);
  text-align: center;
  scroll-margin-top: 88px;
}
.download-logo {
  border-radius: 18px;
  box-shadow: 0 12px 30px rgb(0 0 0 / 0.45);
}
.download h2 {
  margin-top: 22px;
  font-size: clamp(32px, 4vw, 48px);
}
.download .btn {
  margin-top: 28px;
}
.download .meta {
  min-height: 1.6em;
  margin-top: 12px;
}
.note {
  max-width: 34em;
  margin-top: 26px;
  color: var(--text-3);
  font-size: 14px;
}

/* ---------- Подвал ---------- */
.foot {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: clamp(80px, 10vw, 120px);
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: 14px;
}
.foot nav {
  display: flex;
  gap: 22px;
}
.foot a {
  color: var(--text-2);
  text-decoration: none;
}
.foot a:hover {
  color: var(--text);
}

/* ---------- Телефон и узкие окна ---------- */
@media (max-width: 860px) {
  .features {
    grid-template-columns: minmax(0, 1fr);
  }
  .feature.wide {
    display: flex;
  }
  .feature.wide .feature-text {
    padding-bottom: 0;
  }
  .feature.wide .feature-art {
    aspect-ratio: 4 / 3;
  }
  /* На телефоне в ролике оставляем только текст песни — иначе он слишком мелкий */
  .video-shot {
    aspect-ratio: 1 / 1;
  }
  .video-shot video {
    object-position: 77% 50%;
  }
  .art-playlist img {
    width: 175%;
    left: -45%;
    top: -40%;
  }
}
@media (max-width: 560px) {
  body {
    font-size: 16px;
  }
  .top-nav a[href^='#'] {
    display: none;
  }
  .top-row {
    gap: 18px;
  }
  .shot {
    border-radius: 10px;
  }
  .cta .btn,
  .download .btn {
    width: 100%;
  }
  .tags li {
    font-size: 14px;
    padding: 7px 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn,
  .flash {
    transition: none;
  }
}

/* ---------- Аккаунт ---------- */
.account-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.acc {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: clamp(40px, 8vw, 96px);
}
.acc-card {
  width: min(420px, 100%);
  padding: clamp(24px, 4vw, 36px);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.acc-card.wide {
  width: min(620px, 100%);
}
.acc-card h1 {
  font-size: 28px;
}
.acc-sub {
  color: var(--text-2);
  font-size: 15px;
}
.acc-sub b {
  color: var(--text);
  font-weight: 600;
}
.acc-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 22px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text-2);
  font-size: 14px;
}
.field input {
  height: 46px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: rgb(255 255 255 / 0.06);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  transition: box-shadow 0.18s ease, background 0.18s ease;
}
.field input:focus {
  outline: none;
  background: rgb(255 255 255 / 0.08);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.32);
}
.form-msg {
  min-height: 0;
  font-size: 14px;
  color: #ff8a8a;
}
.form-msg:empty {
  display: none;
}
.form-msg[data-kind='ok'] {
  color: #7ee2a0;
}
button.btn {
  border: 0;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
}
button.btn.primary {
  color: var(--accent-ink);
}
.btn:disabled {
  opacity: 0.55;
  pointer-events: none;
}
.btn.block {
  width: 100%;
}
.acc-form .btn {
  height: 46px;
  margin-top: 4px;
}
.setting-form .btn {
  align-self: flex-start;
}
.btn.danger {
  color: #ff8a8a;
}
.btn.danger-solid {
  background: #e5484d;
  color: #fff;
}
.btn.danger-solid:hover {
  background: #f2555a;
}
.link {
  display: block;
  margin: 18px auto 0;
  padding: 4px;
  border: 0;
  background: none;
  color: var(--text-2);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}
.link:hover {
  color: var(--text);
}
.acc-foot {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: 14px;
  text-align: center;
}

.profile {
  display: flex;
  align-items: center;
  gap: 18px;
}
.avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 64px;
  height: 64px;
  overflow: hidden;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.1);
  font-size: 26px;
  font-weight: 700;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-text {
  min-width: 0;
}
.profile-text h1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.settings {
  margin: 28px 0 24px;
}
.setting {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.setting:last-child {
  border-bottom: 1px solid var(--line);
}
.setting-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.setting-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}
.setting-label {
  font-weight: 600;
}
.setting-value {
  overflow: hidden;
  color: var(--text-2);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.setting-form {
  margin-top: 18px;
}

.flash {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 20;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 15px;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.flash.on {
  opacity: 1;
  transform: translate(-50%, 0);
}
[hidden] {
  display: none !important;
}
