/* ============================================================
   WVF POST — стили
   Чёрно-серебристая тема: графитовые поверхности, серебристые
   границы, белая типографика, сдержанные анимации.
   Адаптив от 320 px, поддержка prefers-reduced-motion.
   ============================================================ */

/* ---------------- Токены ---------------- */

:root {
  --bg: #070709;
  --bg-soft: #0b0b0f;
  --surface: #101015;
  --surface-2: #14141a;
  --surface-3: #191920;

  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-silver: linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.06) 40%, rgba(255, 255, 255, 0.18));

  --text: #f3f3f6;
  --text-2: #a9a9b7;
  --text-3: #71717f;

  --silver-hi: #ffffff;
  --silver: #c9c9d6;
  --silver-dim: #8b8b9c;
  --grad-silver: linear-gradient(160deg, #ffffff 0%, #d4d4de 45%, #9797a8 100%);
  --grad-btn: linear-gradient(135deg, #f6f6f9 0%, #c9c9d6 55%, #a7a7ba 100%);

  --danger: #ff9a9a;
  --ok: #b8e6c4;

  --radius: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --shadow-1: 0 10px 30px rgba(0, 0, 0, 0.35);
  --glow: 0 0 60px rgba(190, 196, 226, 0.08);

  --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --header-h: 68px;
}

/* ---------------- Сброс и база ---------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

/* фоновые серебристые «прожилки» */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 480px at 12% -8%, rgba(168, 174, 205, 0.09), transparent 65%),
    radial-gradient(760px 420px at 92% 4%, rgba(128, 134, 165, 0.07), transparent 60%),
    radial-gradient(1100px 700px at 50% 118%, rgba(120, 126, 158, 0.06), transparent 62%);
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

img, svg {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid #d6d6e4;
  outline-offset: 2px;
  border-radius: 4px;
}

body.no-scroll {
  overflow: hidden;
}

.skip-link {
  position: fixed;
  top: -48px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

.noscript-warning {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 300;
  padding: 14px 18px;
  text-align: center;
  background: #1c1114;
  border: 1px solid rgba(255, 154, 154, 0.4);
  border-radius: var(--radius);
  color: var(--danger);
}

/* ---------------- Утилиты ---------------- */

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

.container--narrow {
  width: min(760px, 100% - 40px);
}

.section {
  padding-block: clamp(64px, 9vw, 112px);
}

.section--muted {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0) 55%),
    var(--bg-soft);
  border-block: 1px solid var(--border);
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--silver-dim);
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(1.5rem, 3.4vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-lead {
  margin-top: 14px;
  color: var(--text-2);
  font-size: 1.02rem;
  max-width: 58ch;
}

.text-silver {
  background: var(--grad-silver);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------------- Кнопки ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease,
    border-color 0.16s ease, color 0.16s ease, filter 0.16s ease;
  user-select: none;
}

.btn--primary {
  background: var(--grad-btn);
  color: #0a0a0e;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.btn--primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45), var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.btn--primary:active {
  transform: translateY(0);
  filter: brightness(0.97);
}

.btn--ghost {
  border-color: var(--border-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}

.btn--sm {
  padding: 9px 16px;
  font-size: 0.88rem;
}

.btn--xs {
  padding: 6px 12px;
  font-size: 0.78rem;
}

/* ---------------- Шапка ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(7, 7, 10, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 1.02rem;
}

.logo__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--grad-silver);
  color: #0b0b0e;
  font-size: 1.05rem;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.logo__text {
  background: var(--grad-silver);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-nav__link {
  position: relative;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-2);
  transition: color 0.16s ease;
  padding-block: 6px;
}

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

.site-nav__link.active {
  color: var(--text);
}

.site-nav__link.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-silver);
  opacity: 0.85;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
}

.nav-toggle__bar {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--silver);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded='true'] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded='true'] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded='true'] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------------- Hero ---------------- */

.hero {
  padding-block: clamp(56px, 8vw, 104px) clamp(48px, 6vw, 88px);
  overflow: hidden;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero__title {
  font-size: clamp(2.05rem, 4.6vw, 3.3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.hero__lead {
  margin-top: 20px;
  font-size: clamp(1rem, 1.6vw, 1.13rem);
  color: var(--text-2);
  max-width: 52ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero__note {
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--text-3);
}

.hero__demo {
  min-width: 0;
}

.hero__demo-caption {
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--text-3);
  text-align: center;
}

/* карточка-демонстрация */
.demo-card {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #131319, #0e0e13);
  box-shadow: var(--shadow-1), var(--glow);
  overflow: hidden;
}

.demo-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.demo-card__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad-silver);
  box-shadow: 0 0 10px rgba(220, 224, 240, 0.6);
}

.demo-card__label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--silver-dim);
  margin-right: auto;
}

.demo-card__body {
  padding: 18px 20px 20px;
}

.demo__channel {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.demo__avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--silver);
}

.demo__channel-name {
  font-weight: 700;
  font-size: 0.92rem;
}

.demo__channel-tag {
  margin-left: auto;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 3px 9px;
}

.demo__title {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.demo__line {
  font-size: 0.9rem;
  color: var(--text-2);
  margin-bottom: 6px;
  overflow-wrap: break-word;
}

.demo__line--li {
  padding-left: 14px;
}

.demo__cta {
  margin-top: 12px;
  padding-left: 12px;
  border-left: 2px solid var(--silver-dim);
  font-weight: 700;
  font-size: 0.92rem;
}

.demo__tags {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--silver-dim);
}

/* ---------------- Карточки ---------------- */

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: var(--border-strong);
}

/* ---------------- Возможности ---------------- */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.feature {
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-1), var(--glow);
}

.feature__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
  color: var(--silver);
}

.feature__title {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.feature__text {
  color: var(--text-2);
  font-size: 0.92rem;
  flex-grow: 1;
}

.feature__link {
  align-self: flex-start;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--silver);
  transition: color 0.16s ease;
}

.feature__link:hover {
  color: var(--silver-hi);
}

/* ---------------- Как работает ---------------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  counter-reset: steps;
}

.step {
  position: relative;
  padding: 24px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}

.step__num {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--silver-dim);
}

.step__title {
  margin-top: 10px;
  font-size: 1.02rem;
  font-weight: 800;
}

.step__text {
  margin-top: 8px;
  font-size: 0.88rem;
  color: var(--text-2);
}

/* ---------------- Инструменты ---------------- */

.tools-shell {
  padding: clamp(18px, 3vw, 32px);
  border-color: var(--border-strong);
}

.tool-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  margin-bottom: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.02);
  width: fit-content;
  max-width: 100%;
}

.tool-tab {
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-2);
  transition: color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
  white-space: nowrap;
}

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

.tool-tab.active {
  background: var(--grad-btn);
  color: #0b0b0e;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

/* формы */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 0;
}

.field--full {
  grid-column: 1 / -1;
}

.field label,
.field legend {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
  padding: 0;
}

.req {
  color: var(--silver);
}

.hint {
  font-size: 0.78rem;
  color: var(--text-3);
}

.field input[type='text'],
.field select,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  font: inherit;
  font-size: 0.94rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
  min-width: 0;
}

.field textarea {
  resize: vertical;
  min-height: 74px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-3);
  opacity: 0.8;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: rgba(255, 255, 255, 0.26);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(222, 224, 238, 0.55);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 0 3px rgba(205, 210, 235, 0.12);
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%238b8b9c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.field select option {
  background: var(--surface-2);
  color: var(--text);
}

.field--error input,
.field--error textarea {
  border-color: rgba(255, 154, 154, 0.65) !important;
}

.field__error {
  font-size: 0.8rem;
  color: var(--danger);
}

/* переключатель стилей */

.style-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.radio-pill {
  position: relative;
  cursor: pointer;
}

.radio-pill input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.radio-pill span {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-2);
  transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.radio-pill:hover span {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.3);
}

.radio-pill input:checked + span {
  background: var(--grad-btn);
  border-color: transparent;
  color: #0b0b0e;
  font-weight: 700;
}

.radio-pill input:focus-visible + span {
  outline: 2px solid #d6d6e4;
  outline-offset: 2px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

/* ---------------- Результат ---------------- */

.result {
  margin-top: 28px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(400px 200px at 100% 0%, rgba(190, 196, 226, 0.05), transparent 70%),
    linear-gradient(180deg, #121218, #0d0d12);
  box-shadow: var(--shadow-1);
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.result__body {
  padding: clamp(18px, 3vw, 28px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.result__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.result__title {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.result__meta {
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--text-3);
}

.result__block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.kicker {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--silver-dim);
}

.result__headline {
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
}

.result__text {
  font-size: 0.95rem;
  color: var(--text-2);
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.result__text--li {
  padding-left: 14px;
}

.result__cta {
  padding-left: 14px;
  border-left: 2px solid var(--silver-dim);
  font-weight: 700;
  font-size: 0.95rem;
  overflow-wrap: break-word;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 5px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  color: var(--silver);
  background: rgba(255, 255, 255, 0.02);
}

.gen-note {
  font-size: 0.78rem;
  color: var(--text-3);
  padding: 12px 14px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.015);
}

.result__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* варианты объявления */

.variant-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.02);
  width: fit-content;
  max-width: 100%;
}

.variant-tab {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-2);
  transition: color 0.16s ease, background-color 0.16s ease;
}

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

.variant-tab.active {
  background: var(--grad-btn);
  color: #0b0b0e;
}

.variant-pane {
  display: none;
  flex-direction: column;
  gap: 8px;
}

.variant-pane.active {
  display: flex;
}

.variant__copy {
  align-self: flex-start;
  margin-top: 6px;
}

/* характеристики товара */

.specs-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.specs-row {
  display: grid;
  grid-template-columns: minmax(120px, 38%) 1fr;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.specs-row:last-child {
  border-bottom: 0;
}

.specs-row:nth-child(odd) {
  background: rgba(255, 255, 255, 0.015);
}

.specs__k {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
  overflow-wrap: break-word;
}

.specs__v {
  font-size: 0.86rem;
  color: var(--text-2);
  overflow-wrap: break-word;
}

/* ---------------- История ---------------- */

.history-card {
  margin-top: 28px;
  padding: clamp(18px, 3vw, 28px);
}

.history-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.history-card__title {
  font-size: 1.05rem;
  font-weight: 800;
}

.history-card__note {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--text-3);
  max-width: 60ch;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.015);
}

.history-item__top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge {
  padding: 3px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--silver);
}

.history-item__time {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--text-3);
}

.history-item__snippet {
  font-size: 0.88rem;
  color: var(--text-2);
  overflow-wrap: break-word;
}

.history-item__actions {
  display: flex;
  gap: 8px;
}

.history-item__delete:hover {
  color: var(--danger);
  border-color: rgba(255, 154, 154, 0.5);
}

.history__warning {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--danger);
}

.empty {
  padding: 34px 20px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}

.empty__title {
  font-weight: 800;
  font-size: 0.95rem;
}

.empty__text {
  margin-top: 6px;
  font-size: 0.84rem;
  color: var(--text-3);
  max-width: 46ch;
  margin-inline: auto;
}

/* ---------------- Тарифы ---------------- */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 26px;
}

.plan--featured {
  border-color: rgba(215, 218, 235, 0.38);
  box-shadow: var(--shadow-1), var(--glow);
  background:
    radial-gradient(360px 180px at 50% 0%, rgba(196, 202, 232, 0.07), transparent 75%),
    linear-gradient(180deg, #15151c, var(--surface));
}

.plan__flag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  background: var(--grad-btn);
  color: #0b0b0e;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.plan__name {
  font-size: 1.15rem;
  font-weight: 800;
}

.plan__price {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.plan__sum {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--grad-silver);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.plan__period {
  font-size: 0.78rem;
  color: var(--text-3);
}

.plan__desc {
  font-size: 0.88rem;
  color: var(--text-2);
}

.plan__features {
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex-grow: 1;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

.plan__feature {
  display: flex;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-2);
}

.plan__tick {
  color: var(--silver);
  font-weight: 800;
  flex-shrink: 0;
}

.plan__cta {
  width: 100%;
  margin-top: 6px;
  white-space: normal; /* длинные подписи не должны раздувать карточку на узких экранах */
}

/* ---------------- FAQ ---------------- */

.faq {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  overflow: hidden;
}

.faq__item {
  border-bottom: 1px solid var(--border);
}

.faq__item:last-child {
  border-bottom: 0;
}

.faq__q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  list-style: none;
  transition: background-color 0.16s ease;
}

.faq__q::-webkit-details-marker {
  display: none;
}

.faq__q:hover {
  background: rgba(255, 255, 255, 0.02);
}

.faq__icon {
  position: relative;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.faq__icon::before,
.faq__icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--silver);
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease;
}

.faq__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq__item[open] .faq__icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.faq__a {
  padding: 0 22px 18px;
  font-size: 0.92rem;
  color: var(--text-2);
  max-width: 68ch;
}

/* ---------------- Контакты ---------------- */

.contact-card {
  padding: clamp(28px, 5vw, 48px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  border-color: var(--border-strong);
  box-shadow: var(--glow);
}

.contact-card__text {
  color: var(--text-2);
  max-width: 56ch;
}

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

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding-top: clamp(40px, 6vw, 64px);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
}

.site-footer__desc {
  margin-top: 16px;
  font-size: 0.86rem;
  color: var(--text-3);
  max-width: 40ch;
}

.site-footer__heading {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
}

.site-footer__col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.site-footer__col a {
  font-size: 0.88rem;
  color: var(--text-2);
  transition: color 0.16s ease;
}

.site-footer__col a:hover {
  color: var(--text);
}

.site-footer__small {
  font-size: 0.8rem;
  color: var(--text-3);
}

.site-footer__bottom {
  padding-block: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-3);
}

/* ---------------- Тосты ---------------- */

.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(360px, calc(100vw - 32px));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: rgba(18, 18, 24, 0.96);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-1);
  font-size: 0.88rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast--show {
  opacity: 1;
  transform: translateY(0);
}

.toast__icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 800;
  margin-top: 1px;
}

.toast--success .toast__icon {
  background: rgba(184, 230, 196, 0.14);
  color: var(--ok);
  border: 1px solid rgba(184, 230, 196, 0.35);
}

.toast--error .toast__icon {
  background: rgba(255, 154, 154, 0.12);
  color: var(--danger);
  border: 1px solid rgba(255, 154, 154, 0.35);
}

.toast--info .toast__icon {
  background: rgba(201, 201, 214, 0.1);
  color: var(--silver);
  border: 1px solid var(--border-strong);
}

/* ---------------- Модальные окна ---------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(4, 4, 7, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.modal-overlay--show {
  opacity: 1;
}

.modal {
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 26px 24px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #16161d, #101016);
  box-shadow: var(--shadow-1), var(--glow);
  transform: translateY(8px);
  transition: transform 0.2s ease;
}

.modal-overlay--show .modal {
  transform: translateY(0);
}

.modal__title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.modal__head {
  margin-bottom: 14px;
}

.modal__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal__text {
  font-size: 0.92rem;
  color: var(--text-2);
}

.modal__price-line {
  font-weight: 800;
  color: var(--silver);
  font-size: 0.95rem;
}

.modal__tg {
  align-self: flex-start;
}

.modal__note {
  font-size: 0.86rem;
  color: var(--danger);
}

.modal__small {
  font-size: 0.76rem;
  color: var(--text-3);
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

/* ---------------- Страницы документов ---------------- */

.doc-page {
  padding-block: clamp(40px, 6vw, 72px);
}

.doc-page article {
  max-width: 72ch;
}

.doc-page h1 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.doc-page .doc-updated {
  font-size: 0.84rem;
  color: var(--text-3);
  margin-bottom: 32px;
}

.doc-page h2 {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 28px 0 10px;
}

.doc-page p,
.doc-page li {
  color: var(--text-2);
  font-size: 0.94rem;
}

.doc-page ul {
  list-style: disc;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.doc-page strong {
  color: var(--text);
}

/* ---------------- Анимации появления ---------------- */

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

/* Скрытое состояние только при работающем JS (класс .js ставится в <head>) */
.js .reveal {
  opacity: 0;
}

.js .reveal.in {
  opacity: 1;
  animation: rise 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) backwards;
}

/* Каскад: дети контейнера появляются по очереди */
.js .reveal-stagger > * {
  opacity: 0;
}

.js .reveal-stagger.in > * {
  opacity: 1;
  animation: rise 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) backwards;
}

.js .reveal-stagger.in > *:nth-child(2) { animation-delay: 0.12s; }
.js .reveal-stagger.in > *:nth-child(3) { animation-delay: 0.24s; }
.js .reveal-stagger.in > *:nth-child(4) { animation-delay: 0.36s; }
.js .reveal-stagger.in > *:nth-child(5) { animation-delay: 0.48s; }
.js .reveal-stagger.in > *:nth-child(6) { animation-delay: 0.6s; }

.js .hero__demo.reveal.in {
  animation-delay: 0.15s;
}

/* ---------------- Живые эффекты ---------------- */

/* Медленное переливание «серебро — чёрное — серебро».
   Градиент симметричный: в крайних точках (и в статике без анимаций)
   текст серебристый, середина прохода затемняется — без обрывов. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .text-silver,
  .logo__text,
  .plan__sum {
    background: linear-gradient(
      110deg,
      #eaeaF2 0%,
      #14141b 25%,
      #ffffff 50%,
      #14141b 75%,
      #eaeaf2 100%
    );
    background-size: 280% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: text-shimmer 6.5s ease-in-out infinite alternate;
  }

  .logo__text { animation-duration: 4.5s; }
  .plan__sum { animation-duration: 5.5s; }

  /* Заголовки секций переливаются мягче: тёмная точка — графит, не чёрный */
  .section-title {
    background: linear-gradient(
      110deg,
      #ffffff 0%,
      #4c4c5a 25%,
      #ffffff 50%,
      #4c4c5a 75%,
      #ffffff 100%
    );
    background-size: 280% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: text-shimmer 7.5s ease-in-out infinite alternate;
  }
}

@keyframes text-shimmer {
  from { background-position: 0% 50%; }
  to   { background-position: 100% 50%; }
}

/* Фон страницы медленно «дышит» */
@keyframes ambient-glow {
  from { opacity: 0.5; }
  to   { opacity: 1; }
}

body::before {
  animation: ambient-glow 10s ease-in-out infinite alternate;
}

/* Плавное проявление страницы при загрузке */
@keyframes page-in {
  from { opacity: 0; }
}

body {
  animation: page-in 0.6s ease backwards;
}

/* Дыхание свечения на знаке логотипа */
@keyframes mark-glow {
  from {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  }
  to {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), 0 0 26px rgba(214, 219, 240, 0.45),
      inset 0 1px 0 rgba(255, 255, 255, 0.7);
  }
}

.logo__mark {
  animation: mark-glow 3.5s ease-in-out infinite alternate;
}

/* Демонстрационная карточка едва заметно парит */
@keyframes float-y {
  from { transform: translateY(0); }
  to   { transform: translateY(-10px); }
}

.demo-card {
  animation: float-y 5s ease-in-out infinite alternate;
}

/* Медленный блик, скользящий по карточке (старт и финиш — за пределами,
   поэтому цикл бесшовный) */
@keyframes sheen-sweep {
  0%   { transform: translateX(-170%) skewX(-18deg); }
  55%  { transform: translateX(480%) skewX(-18deg); }
  100% { transform: translateX(480%) skewX(-18deg); }
}

.demo-card {
  position: relative;
  overflow: hidden;
}

.demo-card::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 38%;
  background: linear-gradient(
    105deg,
    transparent,
    rgba(226, 229, 244, 0.1) 42%,
    rgba(255, 255, 255, 0.22) 50%,
    rgba(226, 229, 244, 0.1) 58%,
    transparent
  );
  transform: translateX(-170%) skewX(-18deg);
  pointer-events: none;
  animation: sheen-sweep 6.5s ease-in-out infinite;
}

/* Рекомендуемый тариф: фон медленно переливается */
@keyframes surface-shift {
  from { background-position: 0% 0%; }
  to   { background-position: 100% 100%; }
}

.plan--featured {
  background-size: 220% 220%;
  animation: surface-shift 9s ease-in-out infinite alternate;
}

/* Блик на серебристой кнопке при наведении */
.btn--primary {
  position: relative;
  overflow: hidden;
}

.btn--primary::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 36%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.75) 50%, transparent);
  transform: translateX(-190%) skewX(-18deg);
  pointer-events: none;
}

.btn--primary:hover::after {
  transform: translateX(510%) skewX(-18deg);
  transition: transform 0.9s ease;
}

/* ---------------- Появления интерфейсных блоков ---------------- */

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.tool-panel:not([hidden]) {
  animation: panel-in 0.4s cubic-bezier(0.22, 0.61, 0.36, 1) backwards;
}

.result:not([hidden]) {
  animation: panel-in 0.45s cubic-bezier(0.22, 0.61, 0.36, 1) backwards;
}

.variant-pane.active {
  animation: panel-in 0.35s ease backwards;
}

.faq__item[open] .faq__a {
  animation: panel-in 0.3s ease backwards;
}

.history-item {
  animation: panel-in 0.35s ease backwards;
}

/* Подчёркивание навигации плавно вырастает */
.site-nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-silver);
  opacity: 0.85;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s ease;
}

.site-nav__link.active::after {
  transform: scaleX(1);
}

/* Скроллбар в палитре сайта */
html {
  scrollbar-width: thin;
  scrollbar-color: #2b2b34 #0a0a0d;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #0a0a0d;
}

::-webkit-scrollbar-thumb {
  background: #2b2b34;
  border-radius: 8px;
  border: 2px solid #0a0a0d;
}

::-webkit-scrollbar-thumb:hover {
  background: #40404c;
}

::selection {
  background: rgba(214, 218, 238, 0.3);
}

/* ---------------- Адаптив ---------------- */

@media (max-width: 1020px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 940px) {
  .hero__inner {
    grid-template-columns: 1fr;
  }

  .features-grid,
  .pricing-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .plan--featured {
    order: -1;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    z-index: 90;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 18px 20px 22px;
    background: rgba(8, 8, 12, 0.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s;
  }

  .site-nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .site-nav__link {
    padding: 12px 8px;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .site-nav__link.active::after {
    display: none;
  }

  .site-nav__cta {
    margin-top: 12px;
  }

  body.menu-open {
    overflow: hidden;
  }
}

@media (max-width: 720px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .container,
  .container--narrow {
    width: calc(100% - 32px);
  }

  .site-footer__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .tool-tabs {
    width: 100%;
  }

  .tool-tab {
    flex: 1 1 auto;
    text-align: center;
    padding-inline: 10px;
  }

  .history-card__head {
    flex-direction: column;
    align-items: stretch;
  }

  .history-card__head .btn {
    align-self: flex-start;
  }

  .specs-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .toasts {
    right: 16px;
    left: 16px;
    max-width: none;
  }
}

@media (max-width: 360px) {
  .btn {
    padding-inline: 16px;
    white-space: normal; /* на самых узких экранах подписи кнопок переносятся */
  }

  .demo-card__head {
    flex-wrap: wrap;
  }

  .demo-card__label {
    margin-right: 0;
  }
}

/* ---------------- Уважение к reduced motion ----------------
   Класс html.reduce-motion ставит app.js, когда в системе включена
   настройка «уменьшить движение», а в js/config.js не задано
   respectReducedMotion: false. По умолчанию анимации работают всегда. */

html.reduce-motion {
  scroll-behavior: auto;
}

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

html.reduce-motion .reveal,
html.reduce-motion .reveal-stagger > * {
  opacity: 1;
  transform: none;
}
