/* jhint — страница цен. Тёмная «ночная» палитра под сам продукт: оверлей поверх экрана,
   тонкая линия сигнала, тёплый янтарь как единственный акцент. */

@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,600;12..96,800&family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500&display=swap");

:root {
  --ink: #07070a;
  --ink-raised: #101017;
  --ink-line: #1e1e29;
  --paper: #ecebe6;
  --paper-dim: #9a988f;
  --amber: #e8a33d;
  --amber-soft: rgba(232, 163, 61, 0.14);
  --signal: #6fd3b8;
  --radius: 14px;
  --display: "Bricolage Grotesque", Georgia, serif;
  --body: "IBM Plex Sans", -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Зерно поверх фона: экран ночью, а не плоская заливка. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
}

body::after {
  content: "";
  position: fixed;
  z-index: 0;
  pointer-events: none;
  top: -20vh;
  left: 50%;
  width: 120vw;
  height: 70vh;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(232, 163, 61, 0.09), transparent 62%);
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ── Шапка ─────────────────────────────────────────────────────────────── */

header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 34px 0 0;
}

.mark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.02em;
}

.mark span {
  color: var(--amber);
}

.mark-note {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--paper-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Заголовок ─────────────────────────────────────────────────────────── */

.hero {
  padding: 92px 0 26px;
  max-width: 780px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--signal);
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 0 rgba(111, 211, 184, 0.6);
  animation: pulse 2.6s ease-out infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 11px rgba(111, 211, 184, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(111, 211, 184, 0);
  }
}

h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.9rem, 7vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 22px 0 20px;
}

h1 em {
  font-style: normal;
  color: var(--amber);
}

.lede {
  font-size: 19px;
  color: var(--paper-dim);
  max-width: 60ch;
}

/* Линия сигнала — визуальный мотив продукта. */
.signal {
  width: 100%;
  height: 54px;
  margin: 44px 0 10px;
  overflow: hidden;
}

.signal path {
  fill: none;
  stroke: var(--amber);
  stroke-width: 1.4;
  opacity: 0.55;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: draw 2.8s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

/* ── Тариф ─────────────────────────────────────────────────────────────── */

.pricing {
  padding: 26px 0 20px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 46px;
  align-items: start;
}

@media (max-width: 860px) {
  .pricing {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.65rem;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.features {
  list-style: none;
  display: grid;
  gap: 13px;
}

.features li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  color: var(--paper-dim);
  font-size: 16.5px;
}

.features li::before {
  content: "";
  margin-top: 10px;
  height: 1px;
  background: var(--amber);
  opacity: 0.75;
}

.features strong {
  color: var(--paper);
  font-weight: 500;
}

/* Карточка тарифа */
.card {
  background: linear-gradient(168deg, var(--ink-raised), #0a0a10);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
  padding: 30px 30px 26px;
  box-shadow: 0 26px 60px -30px rgba(0, 0, 0, 0.9);
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(150deg, var(--amber-soft), transparent 45%);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.tier-name {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-dim);
}

/* Переключатель периода */
.toggle {
  display: inline-flex;
  margin: 18px 0 24px;
  padding: 3px;
  background: #08080d;
  border: 1px solid var(--ink-line);
  border-radius: 999px;
}

.toggle button {
  font: inherit;
  font-size: 14.5px;
  font-family: var(--mono);
  color: var(--paper-dim);
  background: none;
  border: 0;
  padding: 7px 17px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}

.toggle button[aria-pressed="true"] {
  background: var(--amber);
  color: #14100a;
  font-weight: 500;
}

.toggle button:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

.save {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--signal);
  margin-left: 12px;
  letter-spacing: 0.04em;
}

/* Цена: строка приходит от Paddle уже отформатированной — своей математики нет. */
.amount {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.6rem, 6vw, 3.4rem);
  letter-spacing: -0.03em;
  line-height: 1;
  min-height: 3.4rem;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.amount[data-loading="true"] {
  color: var(--ink-line);
}

.period {
  font-family: var(--body);
  font-size: 16px;
  font-weight: 400;
  color: var(--paper-dim);
  letter-spacing: 0;
}

.trial {
  margin-top: 12px;
  font-size: 15px;
  color: var(--paper-dim);
}

.buy {
  width: 100%;
  margin-top: 22px;
  font-family: var(--body);
  font-size: 16.5px;
  font-weight: 500;
  color: #14100a;
  background: var(--amber);
  border: 0;
  border-radius: 10px;
  padding: 15px;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.buy:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px -12px rgba(232, 163, 61, 0.7);
}

.buy:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.fineprint {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--paper-dim);
  text-align: center;
}

/* ── Служебные состояния ───────────────────────────────────────────────── */

.notice {
  margin: 20px 0;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(232, 163, 61, 0.4);
  background: var(--amber-soft);
  font-size: 15px;
}

.notice[hidden] {
  display: none;
}

footer {
  margin-top: 84px;
  padding: 26px 0 44px;
  border-top: 1px solid var(--ink-line);
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  font-size: 14px;
  color: var(--paper-dim);
}

footer a {
  color: var(--paper-dim);
  text-decoration: none;
  border-bottom: 1px solid var(--ink-line);
}

footer a:hover {
  color: var(--paper);
}

/* ── Страница после оплаты ─────────────────────────────────────────────── */

.welcome {
  padding: 96px 0 0;
  max-width: 700px;
}

.key {
  margin: 26px 0 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.key code {
  font-family: var(--mono);
  font-size: clamp(1.1rem, 3.4vw, 1.5rem);
  letter-spacing: 0.06em;
  color: var(--amber);
  background: var(--ink-raised);
  border: 1px solid var(--ink-line);
  border-radius: 10px;
  padding: 14px 18px;
}

.copy {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--paper);
  background: none;
  border: 1px solid var(--ink-line);
  border-radius: 8px;
  padding: 11px 15px;
  cursor: pointer;
}

.copy:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.steps {
  margin-top: 30px;
  padding-left: 20px;
  color: var(--paper-dim);
  display: grid;
  gap: 9px;
}

/* Появление блоков при загрузке — один хорошо поставленный вход. */
.rise {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.rise:nth-child(2) {
  animation-delay: 0.06s;
}
.rise:nth-child(3) {
  animation-delay: 0.12s;
}
.rise:nth-child(4) {
  animation-delay: 0.18s;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .signal path {
    stroke-dashoffset: 0;
  }
}
