/* — шрифты — */

@font-face {
  font-family: "Loos Wide";
  src: url("/fonts/loos-wide-black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Google Sans";
  src: url("/fonts/google-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #08080b;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.028);
  --stroke: rgba(255, 255, 255, 0.1);
  --stroke-soft: rgba(255, 255, 255, 0.06);
  --text: #f4f4f6;
  --muted: #8b8b95;
  --dim: #5d5d68;
  --accent: #b8ff4f;
  --accent-ink: #10130a;
  --danger: #ff8b8b;
  --radius: 16px;

  --font-text: "Google Sans", ui-sans-serif, -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-display: "Loos Wide", "Google Sans", ui-sans-serif, system-ui, sans-serif;

  --page: 680px;
  --gutter: 20px;
}

* {
  box-sizing: border-box;
}

/* Классы вроде .promo и .progress задают display и перебивают [hidden] из UA-стилей. */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.glow {
  position: fixed;
  inset: -30% -10% auto;
  z-index: 0;
  height: 70vh;
  pointer-events: none;
  background:
    radial-gradient(46% 60% at 22% 28%, rgba(184, 255, 79, 0.13), transparent 70%),
    radial-gradient(40% 55% at 78% 12%, rgba(120, 130, 255, 0.16), transparent 72%);
  filter: blur(20px);
}

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: calc(var(--page) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 26px var(--gutter) 56px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ic {
  flex: none;
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.22em;
  fill: none;
  stroke: currentColor;
  stroke-width: 16;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Точки и залитые кружки в иконках Phosphor рисуются заливкой, а не обводкой. */
.ic circle:not([fill="none"]),
.ic [fill]:not([fill="none"]) {
  fill: currentColor;
  stroke: none;
}

/* — типографика — */

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.005em;
}

.prose h2 {
  margin: 52px 0 16px;
  font-size: clamp(24px, 5.4vw, 30px);
}

.prose h3 {
  margin: 0 0 6px;
  font-size: 17px;
  letter-spacing: 0;
}

.prose p {
  margin: 0 0 14px;
  color: #c9c9d1;
}

.prose code {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.86em;
  white-space: nowrap;
}

.prose b,
.prose strong {
  color: var(--text);
  font-weight: 700;
}

/* — шапка — */

.head {
  margin-bottom: 30px;
}

.mark {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.mark__text {
  /* Название бренда живёт в Google Sans — так просил заказчик. */
  font-family: var(--font-text);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.bars {
  display: flex;
  gap: 2.5px;
  align-items: flex-end;
  height: 18px;
}

.bars i {
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
  animation: pulse 1.5s ease-in-out infinite;
}

.bars i:nth-child(1) { height: 40%; animation-delay: -0.5s; }
.bars i:nth-child(2) { height: 100%; animation-delay: -0.9s; }
.bars i:nth-child(3) { height: 62%; animation-delay: -0.2s; }
.bars i:nth-child(4) { height: 85%; animation-delay: -1.2s; }

@keyframes pulse {
  0%, 100% { transform: scaleY(0.42); opacity: 0.6; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* — герой — */

.hero {
  margin-bottom: 26px;
}

.hero__title {
  margin: 0;
  font-size: clamp(30px, 7.6vw, 46px);
  letter-spacing: -0.015em;
}

.hero__sub {
  margin: 12px 0 0;
  color: var(--accent);
  font-size: clamp(15px, 3.6vw, 17px);
  font-weight: 500;
}

.hero__lead {
  margin: 14px 0 0;
  max-width: 56ch;
  color: #c9c9d1;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.badges li {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 5px 11px 5px 9px;
  border: 1px solid var(--stroke-soft);
  border-radius: 99px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.badges .ic {
  color: var(--accent);
}

/* — поиск — */

.tool {
  scroll-margin-top: 20px;
}

.finder {
  display: flex;
  gap: 8px;
  padding: 7px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.2s;
}

.finder:focus-within {
  border-color: rgba(184, 255, 79, 0.42);
}

.finder__field {
  display: flex;
  flex: 1;
  gap: 9px;
  align-items: center;
  min-width: 0;
  padding-left: 11px;
}

.finder__icon {
  color: var(--dim);
  font-size: 17px;
}

.finder__input {
  flex: 1;
  min-width: 0;
  padding: 11px 2px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  outline: none;
}

.finder__input::placeholder {
  color: var(--dim);
}

.finder__submit {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 112px;
  padding: 12px 18px;
  border: 0;
  border-radius: 11px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s, opacity 0.2s;
}

.finder__submit:hover:not(:disabled) {
  transform: translateY(-1px);
}

.finder__submit:disabled {
  cursor: progress;
  opacity: 0.72;
}

.finder__label,
.spinner {
  grid-area: 1 / 1;
}

.spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(16, 19, 10, 0.28);
  border-top-color: var(--accent-ink);
  border-radius: 50%;
  opacity: 0;
  animation: spin 0.7s linear infinite;
}

.is-busy .finder__label { opacity: 0; }
.is-busy .spinner { opacity: 1; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hint {
  margin: 11px 2px 0;
  color: var(--dim);
  font-size: 13px;
}

/* — карточка трека — */

.card {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--stroke);
  border-radius: 20px;
  background: var(--surface);
  animation: rise 0.34s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
}

.card__top {
  display: flex;
  gap: 15px;
  align-items: center;
}

.card__cover {
  width: 84px;
  height: 84px;
  flex: none;
  border-radius: 13px;
  background: #16161b;
  object-fit: cover;
}

.card__info {
  min-width: 0;
}

.card__title {
  margin: 0;
  overflow: hidden;
  font-family: var(--font-text);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card__meta {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.card__link {
  display: inline-block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  text-decoration-color: rgba(255, 255, 255, 0.2);
  text-underline-offset: 3px;
}

.card__link:hover {
  color: var(--text);
}

/* — форматы — */

.formats {
  display: flex;
  gap: 7px;
  margin-top: 17px;
}

.chip {
  flex: 1;
  padding: 10px 6px;
  border: 1px solid var(--stroke);
  border-radius: 11px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.16s, color 0.16s, background 0.16s;
}

.chip small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 400;
  opacity: 0.72;
}

.chip:hover:not(:disabled) {
  color: var(--text);
}

.chip.is-active {
  border-color: rgba(184, 255, 79, 0.5);
  background: rgba(184, 255, 79, 0.09);
  color: var(--accent);
}

.chip:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.download {
  display: flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 13px;
  padding: 14px;
  border: 0;
  border-radius: 12px;
  background: var(--text);
  color: #0c0c0f;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s, opacity 0.2s;
}

.download:hover:not(:disabled) {
  transform: translateY(-1px);
}

.download:disabled {
  cursor: progress;
  opacity: 0.5;
  transform: none;
}

/* — прогресс — */

.progress {
  display: flex;
  gap: 11px;
  align-items: center;
  margin-top: 13px;
}

.progress__bar {
  position: relative;
  flex: 1;
  height: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.09);
}

.progress__bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: 3px;
  background: var(--accent);
  transition: width 0.18s ease-out;
}

.progress__bar.is-indeterminate i {
  width: 34%;
  animation: slide 1.15s ease-in-out infinite;
}

@keyframes slide {
  0% { left: -34%; }
  100% { left: 100%; }
}

.progress__text {
  min-width: 74px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.status {
  margin: 15px 2px 0;
  min-height: 22px;
  color: var(--muted);
  font-size: 14px;
}

.status[data-kind="error"] { color: var(--danger); }
.status[data-kind="ok"] { color: var(--accent); }

/* — инструкция — */

.steps {
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--stroke-soft);
}

.step:first-child {
  border-top: 0;
  padding-top: 4px;
}

.step__num {
  display: grid;
  flex: none;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(184, 255, 79, 0.35);
  border-radius: 50%;
  background: rgba(184, 255, 79, 0.08);
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

.step__body {
  min-width: 0;
}

.step__body p {
  margin: 0;
}

/* — макеты интерфейса Suno в инструкции — */

.mock {
  margin-top: 12px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: #141418;
  font-size: 14px;
}

.mock--menu {
  max-width: 250px;
  padding: 6px;
}

.mock__row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 9px;
  color: var(--muted);
}

.mock__row.is-active {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
  font-weight: 600;
}

.mock--toast {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  padding: 10px 15px;
  border-radius: 99px;
  color: var(--text);
}

.note {
  display: flex;
  gap: 11px;
  margin: 22px 0 0;
  padding: 15px 17px;
  border: 1px solid rgba(184, 255, 79, 0.22);
  border-radius: 14px;
  background: rgba(184, 255, 79, 0.05);
  color: #c9c9d1;
  font-size: 15px;
}

.note .ic {
  flex: none;
  margin-top: 3px;
  color: var(--accent);
}

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

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.fcard {
  padding: 18px;
  border: 1px solid var(--stroke-soft);
  border-radius: 16px;
  background: var(--surface-2);
}

.fcard h3 {
  margin-bottom: 8px;
  color: var(--accent);
}

.fcard p {
  margin: 0;
  font-size: 15px;
}

/* — FAQ — */

.faq {
  border-bottom: 1px solid var(--stroke-soft);
}

.faq summary {
  padding: 15px 30px 15px 0;
  position: relative;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 6px;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s;
}

.faq[open] summary::after {
  transform: translateY(-30%) rotate(225deg);
}

.faq p {
  margin: 0 0 16px;
  padding-right: 24px;
  font-size: 15px;
}

/* — рекламные места — */

.promo {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  padding: 14px var(--gutter);
  overflow: hidden;
}

.promo--full {
  padding-inline: 0;
}

.promo__inner {
  display: flex;
  justify-content: center;
  max-width: 100%;
}

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

.promo iframe {
  display: block;
  max-width: 100%;
  border: 0;
}

/* Фиксированный html-баннер ужимается на узком экране целиком, вместе с содержимым. */
.promo__scaler {
  transform-origin: top center;
}

.promo__box {
  position: relative;
  overflow: hidden;
}

/* — подвал — */

.foot {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--stroke-soft);
}

.foot__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  max-width: calc(var(--page) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 22px var(--gutter) 34px;
  color: var(--muted);
  font-size: 13px;
}

.foot__dim {
  color: var(--dim);
}

/* — мобильные — */

@media (max-width: 620px) {
  body {
    font-size: 15.5px;
  }

  .page {
    padding: 20px var(--gutter) 44px;
  }

  .finder {
    flex-direction: column;
    gap: 7px;
    padding: 8px;
  }

  .finder__field {
    padding-left: 8px;
  }

  .finder__submit {
    width: 100%;
    padding: 13px;
  }

  .card__top {
    align-items: flex-start;
  }

  .card__cover {
    width: 66px;
    height: 66px;
  }

  .card__title {
    font-size: 17px;
    white-space: normal;
  }

  .prose h2 {
    margin-top: 42px;
  }

  .step {
    gap: 11px;
  }

  .progress__text {
    min-width: 62px;
  }
}

@media (max-width: 380px) {
  .badges li {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
