/* Perfectio — сайт (лендинг и юридические страницы).
   Та же синяя палитра, что в Mini App. Тёмная тема — автоматически по настройке системы. */

:root {
  --brand: #2563eb;
  --brand-strong: #1d4ed8;
  --brand-soft: #e8efff;
  --sky: #38bdf8;
  --indigo: #6366f1;
  --deep: #0b1b3a;
  --grad: linear-gradient(135deg, #0b1b3a 0%, #1e3a8a 48%, #2563eb 100%);
  --grad-text: linear-gradient(100deg, #2563eb 0%, #38bdf8 35%, #6366f1 65%, #2563eb 100%);

  --bg: #f6f8fd;
  --bg-2: #eef3fc;
  --surface: #ffffff;
  --surface-2: #f2f6fc;
  --line: #e2e8f3;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --good: #16a34a;
  --todo-bg: #fff4d6;
  --todo: #8a5a00;

  --radius: 20px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 30px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 30px 70px rgba(11, 27, 58, 0.22);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #3b82f6;
    --brand-strong: #60a5fa;
    --brand-soft: #16264a;
    --grad: linear-gradient(135deg, #07122a 0%, #102a63 50%, #1d4ed8 100%);
    --bg: #070f1f;
    --bg-2: #0b1730;
    --surface: #0f1b33;
    --surface-2: #14223f;
    --line: #1f2f50;
    --text: #e8eefb;
    --text-2: #c3cee4;
    --muted: #8d9bb8;
    --good: #4ade80;
    --todo-bg: #3a2b08;
    --todo: #fbd38d;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 30px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  display: block;
}

a {
  color: var(--brand-strong);
}

h1,
h2,
h3 {
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--surface);
  border-radius: 10px;
}

.skip:focus {
  left: 8px;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 50%, transparent);
  outline-offset: 2px;
}

.todo {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--todo-bg);
  color: var(--todo);
  font-weight: 600;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1.5px solid transparent;
  border-radius: 14px;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s;
}

.btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s var(--ease);
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn--primary {
  background: linear-gradient(180deg, #2f7cf0 0%, #1d62dd 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(29, 98, 221, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn--primary:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, #3a86f5 0%, #1f68e6 100%);
  box-shadow: 0 16px 32px rgba(29, 98, 221, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn--primary:active,
.btn--ghost:active,
.btn--glass:active,
.btn--white:active {
  transform: translateY(0) scale(0.98);
}

.btn--ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}

.btn--ghost:hover {
  border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
  transform: translateY(-1px);
}

.btn--glass {
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  color: var(--text);
  border-color: color-mix(in srgb, var(--brand) 25%, var(--line));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn--glass:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
}

.btn--white {
  background: #fff;
  color: #1d4ed8;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn--white:hover {
  transform: translateY(-2px);
}

.btn--sm {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 14px;
}

.btn--lg {
  min-height: 54px;
  padding: 14px 26px;
  font-size: 16px;
  border-radius: 16px;
}

.btn--block {
  width: 100%;
}

.btn .btn__plane {
  width: 18px;
  height: 18px;
  color: #229ed9;
}

.btn:hover .btn__plane {
  transform: translate(2px, -2px);
}

.cta-band .btn .btn__plane {
  color: #fff;
}

/* Ссылки на бота и канал показываются, когда адрес пришёл с сервера (иначе вели бы на пустой t.me) */
a[data-bot-link]:not(.is-ready),
a[data-channel-link]:not(.is-ready) {
  display: none !important;
}

/* ---------------------------------------------------------------- шапка */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background 0.3s, box-shadow 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}

.topbar.is-scrolled {
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(1.5) blur(16px);
  -webkit-backdrop-filter: saturate(1.5) blur(16px);
  border-color: color-mix(in srgb, var(--line) 80%, transparent);
}

.topbar__in {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 70px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.logo img {
  border-radius: 9px;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.topnav {
  display: none;
  gap: 2px;
  margin-left: 16px;
  white-space: nowrap;
}

.topnav a {
  flex: none;
  padding: 8px 12px;
  white-space: nowrap;
  border-radius: 10px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.topnav a:hover {
  background: var(--surface-2);
  color: var(--brand-strong);
}

.topbar__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar__actions .btn--ghost,
.topbar__actions .btn--primary {
  display: none;
}

.burger {
  width: 44px;
  height: 44px;
  display: grid;
  place-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
}

.burger span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.25s var(--ease);
}

.burger[aria-expanded="true"] span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.burger[aria-expanded="true"] span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 20px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  animation: drop 0.3s var(--ease);
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav a:not(.btn) {
  padding: 12px 4px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.mobile-nav .btn {
  margin-top: 12px;
}

@keyframes drop {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@media (min-width: 640px) {
  .topbar__actions .btn--primary {
    display: inline-flex;
  }
}

@media (min-width: 1120px) {
  .topnav,
  .topbar__actions .btn--ghost {
    display: flex;
  }
  .burger,
  .mobile-nav {
    display: none !important;
  }
}

/* ---------------------------------------------------------------- первый экран */

.hero {
  position: relative;
  overflow: hidden;
  padding: 28px 0 0;
  margin-top: -70px;
  padding-top: 110px;
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  animation: blob 18s ease-in-out infinite;
}

.blob--1 {
  width: 520px;
  height: 520px;
  left: -160px;
  top: -120px;
  background: #60a5fa;
}

.blob--2 {
  width: 460px;
  height: 460px;
  right: -140px;
  top: 40px;
  background: #818cf8;
  animation-delay: -6s;
}

.blob--3 {
  width: 380px;
  height: 380px;
  left: 35%;
  bottom: -160px;
  background: #38bdf8;
  animation-delay: -12s;
  opacity: 0.4;
}

@media (prefers-color-scheme: dark) {
  .blob {
    opacity: 0.28;
  }
}

.grid-lines {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(color-mix(in srgb, var(--brand) 9%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--brand) 9%, transparent) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
}

@keyframes blob {
  33% {
    transform: translate(40px, -30px) scale(1.08);
  }
  66% {
    transform: translate(-30px, 30px) scale(0.95);
  }
}

.hero__in {
  position: relative;
  display: grid;
  gap: 48px;
  align-items: center;
  padding-bottom: 56px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 7px 14px 7px 10px;
  border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.pulse-dot {
  position: relative;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--good);
}

.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid var(--good);
  animation: ping 2s ease-out infinite;
}

@keyframes ping {
  from {
    transform: scale(0.5);
    opacity: 0.9;
  }
  to {
    transform: scale(1.6);
    opacity: 0;
  }
}

.hero h1 {
  font-size: clamp(36px, 4.6vw, 60px);
  font-weight: 800;
  text-wrap: balance;
}

@media (max-width: 699px) {
  .br-d {
    display: none;
  }
}

.shimmer {
  background: var(--grad-text);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
}

@keyframes shimmer {
  to {
    background-position: -250% 0;
  }
}

.lead {
  max-width: 560px;
  margin: 20px 0 28px;
  font-size: clamp(17px, 2vw, 19px);
  color: var(--text-2);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__stats {
  display: flex;
  gap: 32px;
  margin: 40px 0 0;
}

.hero__stats dt {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__stats dd {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* телефон */

.hero__visual {
  position: relative;
  justify-self: center;
  width: min(360px, 88vw);
  aspect-ratio: 360 / 620;
}

.orbit {
  position: absolute;
  inset: -20px -60px;
  pointer-events: none;
}

.float-chip {
  position: absolute;
  left: var(--x);
  top: var(--y);
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  animation: floaty 7s ease-in-out infinite;
  animation-delay: var(--d);
  z-index: 2;
}

.float-chip::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--brand);
  vertical-align: 1px;
}

@keyframes floaty {
  50% {
    transform: translateY(-14px) rotate(-1.5deg);
  }
}

.phone {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 12px;
  border-radius: 46px;
  background: linear-gradient(160deg, #1e293b, #0b1220);
  box-shadow: var(--shadow-lg), inset 0 0 0 2px rgba(255, 255, 255, 0.08);
  transform-style: preserve-3d;
  transition: transform 0.4s var(--ease);
}

.phone__notch {
  position: absolute;
  top: 20px;
  left: 50%;
  z-index: 3;
  width: 96px;
  height: 26px;
  border-radius: 20px;
  background: #0b1220;
  transform: translateX(-50%);
}

.phone__screen {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 36px;
  background: #eef3fb;
}

@media (prefers-color-scheme: dark) {
  .phone__screen {
    background: #0c1629;
  }
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 50px 16px 12px;
  background: var(--grad);
  color: #fff;
}

.chat-head img {
  border-radius: 10px;
}

.chat-head div {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.chat-head strong {
  font-size: 15px;
}

.chat-head span {
  font-size: 12px;
  opacity: 0.85;
}

.online {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  vertical-align: 1px;
}

.chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 12px;
  overflow: hidden;
}

.bubble {
  max-width: 86%;
  padding: 10px 13px;
  border-radius: 18px;
  font-size: 13.5px;
  line-height: 1.45;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.07);
  animation: bubble-in 0.45s var(--ease) both;
}

.bubble--bot {
  align-self: flex-start;
  border-bottom-left-radius: 6px;
  background: #fff;
  color: #0f172a;
}

.bubble--me {
  align-self: flex-end;
  border-bottom-right-radius: 6px;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
}

@media (prefers-color-scheme: dark) {
  .bubble--bot {
    background: #16233f;
    color: #e8eefb;
  }
}

.bubble small {
  display: block;
  margin-bottom: 3px;
  color: #2563eb;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bubble--fb small {
  color: #16a34a;
}

.bubble .score-chip {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e7f6ec;
  color: #15803d;
  font-size: 12px;
  font-weight: 700;
}

.typing {
  display: inline-flex;
  gap: 4px;
  padding: 4px 2px;
}

.typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
  animation: typing 1.2s infinite;
}

.typing i:nth-child(2) {
  animation-delay: 0.15s;
}

.typing i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typing {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

@keyframes bubble-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
}

.chat.is-leaving .bubble {
  animation: bubble-out 0.5s var(--ease) forwards;
}

@keyframes bubble-out {
  to {
    opacity: 0;
    transform: translateY(-16px);
  }
}

.chat-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 12px 16px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #fff;
  color: #94a3b8;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
}

@media (prefers-color-scheme: dark) {
  .chat-input {
    background: #16233f;
  }
}

.chat-input.is-typing {
  color: #0f172a;
}

@media (prefers-color-scheme: dark) {
  .chat-input.is-typing {
    color: #e8eefb;
  }
}

.send-ico {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #2563eb;
  margin-left: 8px;
}

.score-float {
  position: absolute;
  z-index: 3;
  right: -54px;
  top: 30%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 10px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  animation: floaty 6s ease-in-out infinite;
  animation-delay: -2s;
}

.score-float svg {
  width: 44px;
  height: 44px;
  transform: rotate(-90deg);
}

.r-bg {
  fill: none;
  stroke: var(--line);
  stroke-width: 5;
}

.r-val {
  fill: none;
  stroke: var(--brand);
  stroke-width: 5;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.2s var(--ease);
}

.score-float div {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.score-float strong {
  font-size: 18px;
}

.score-float span {
  color: var(--muted);
  font-size: 12px;
}

@media (min-width: 980px) {
  .hero__in {
    grid-template-columns: 1.1fr 0.9fr;
    min-height: calc(100vh - 150px);
    padding-bottom: 72px;
  }
}

@media (max-width: 520px) {
  .hero__cta .btn {
    width: 100%;
  }
  .orbit {
    inset: -10px -8px;
  }
  .float-chip {
    font-size: 11px;
    padding: 6px 10px;
  }
  .score-float {
    right: -6px;
  }
  .float-chip {
    left: clamp(0px, var(--x), calc(100% - 118px));
  }
  .hero__stats {
    gap: 20px;
  }
  .hero__stats dt {
    font-size: 28px;
  }
}

/* бегущая строка технологий */

.marquee {
  position: relative;
  overflow: hidden;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.marquee__track {
  display: flex;
  gap: 44px;
  width: max-content;
  animation: marquee 40s linear infinite;
}

.marquee span {
  color: var(--muted);
  font-weight: 700;
  font-size: 17px;
  white-space: nowrap;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ---------------------------------------------------------------- секции */

.section {
  position: relative;
  padding: 96px 0;
}

.section--tint {
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
}

.kicker {
  margin: 0 0 12px;
  color: var(--brand-strong);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.kicker--light {
  color: #93c5fd;
}

.section h2 {
  max-width: 720px;
  text-wrap: balance;
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 800;
}

.sub {
  max-width: 620px;
  margin: 16px 0 0;
  color: var(--text-2);
  font-size: 18px;
}

/* шаги */

.steps {
  position: relative;
  display: grid;
  gap: 18px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  padding: 26px 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.step:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.step__num {
  position: absolute;
  top: 18px;
  right: 22px;
  color: color-mix(in srgb, var(--brand) 22%, transparent);
  font-size: 44px;
  font-weight: 900;
  line-height: 1;
}

.step__icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 16px;
  background: var(--grad);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.3);
}

.step__icon svg,
.checks li::before {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.step h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.step p {
  margin: 0;
  color: var(--text-2);
  font-size: 16px;
}

@media (min-width: 720px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1080px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
  .steps::before {
    content: "";
    position: absolute;
    left: 8%;
    right: 8%;
    top: 51px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--brand), var(--sky), var(--indigo), transparent);
    background-size: 200% 100%;
    animation: flow 5s linear infinite;
    opacity: 0.5;
    z-index: 0;
  }
  .step {
    z-index: 1;
  }
}

@keyframes flow {
  to {
    background-position: -200% 0;
  }
}

/* живой пример */

.demo {
  margin-top: 36px;
}

.demo__tabs {
  display: flex;
  gap: 6px;
  width: max-content;
  max-width: 100%;
  margin-bottom: 18px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  overflow-x: auto;
  scrollbar-width: none;
}

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

.demo__tabs button {
  flex: none;
  min-width: 112px;
  padding: 10px 18px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.demo__tabs button:hover {
  background: var(--surface-2);
  color: var(--brand-strong);
}

.demo__tabs button[aria-selected="true"] {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}

.demo__card {
  display: grid;
  gap: 20px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.demo__side,
.demo__main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.demo__empty {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 220px;
  padding: 28px;
  border: 1.5px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
}

.demo__empty[hidden] {
  display: none;
}

.demo__empty img {
  border-radius: 12px;
  opacity: 0.9;
}

.demo__empty p {
  max-width: 340px;
  margin: 0;
  font-size: 15px;
}

.demo__q {
  padding: 20px;
  border-radius: 18px;
  background: var(--grad);
  color: #fff;
}

.demo__meta {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 13px;
  font-weight: 700;
}

.demo__q p {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
}

.demo__choose {
  display: grid;
  gap: 8px;
}

.chip-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.chip-btn:hover {
  border-color: color-mix(in srgb, var(--brand) 50%, var(--line));
  background: var(--surface-2);
}

.chip-btn.is-active {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.chip-btn__dot {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 50%;
  background: var(--brand);
}

.chip-btn__dot--good {
  background: var(--good);
}

.chip-btn__dot--weak {
  background: #f59e0b;
}

.demo__label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.demo__answer p,
.demo__feedback p {
  margin: 0;
  color: var(--text-2);
  font-size: 16px;
}

.demo__answer {
  padding: 16px 18px;
  border-left: 3px solid var(--brand);
  border-radius: 4px 14px 14px 4px;
  background: var(--surface-2);
  animation: bubble-in 0.4s var(--ease) both;
}

.demo__answer p.is-typing::after {
  content: "▍";
  margin-left: 2px;
  color: var(--brand);
  animation: blink 0.9s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.demo__feedback {
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--good) 30%, var(--line));
  border-radius: 16px;
  background: color-mix(in srgb, var(--good) 6%, var(--surface));
  animation: bubble-in 0.5s var(--ease) both;
}

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

.demo__avatar img {
  border-radius: 8px;
}

.demo__score {
  margin-left: auto;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--good);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.demo__score.is-low {
  background: #f59e0b;
}

.meter {
  height: 8px;
  margin-top: 14px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--sky));
  transition: width 1.1s var(--ease);
}

.demo__own textarea {
  width: 100%;
  padding: 14px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  resize: vertical;
  outline: none;
}

.demo__own textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent);
}

.demo__own-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

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

@media (min-width: 900px) {
  .demo__card {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 24px;
    padding: 24px;
  }
  .demo__main {
    min-height: 380px;
  }
}

/* направления */

.tracks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
  margin-top: 44px;
}

.track {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
}

.track::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--brand) 12%, transparent), transparent 45%);
  opacity: 0;
  transition: opacity 0.3s;
}

.track:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
  box-shadow: var(--shadow-lg);
}

.track:hover::before {
  opacity: 1;
}

.track__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-bottom: 14px;
  border-radius: 15px;
  background: var(--brand-soft);
  font-size: 26px;
}

.track h3 {
  position: relative;
  margin-bottom: 6px;
  font-size: 18px;
}

.track p {
  position: relative;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* тёмная секция с отчётом */

.section--dark {
  overflow: hidden;
  background: var(--grad);
  color: #fff;
}

.section--dark::before {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  right: -200px;
  top: -200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.45), transparent 65%);
  animation: blob 16s ease-in-out infinite;
}

.result {
  position: relative;
  display: grid;
  gap: 48px;
  align-items: center;
}

.checks {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.checks li {
  display: flex;
  gap: 12px;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.9);
}

.result__cta {
  margin-top: 32px;
}

.checks li::before {
  content: "";
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16) center / 16px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5 10 17l9-10'/%3E%3C/svg%3E");
}

.report {
  padding: 24px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
  transform: perspective(1200px) rotateY(-6deg) rotateX(3deg);
  transition: transform 0.6s var(--ease);
}

.report:hover {
  transform: none;
}

.report__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 800;
  font-size: 18px;
}

.pill {
  padding: 4px 12px;
  border-radius: 999px;
  background: #fff;
  color: #1d4ed8;
  font-size: 14px;
}

.report__rings {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  align-items: center;
  margin: 22px 0;
}

.ring-big {
  position: relative;
  width: 124px;
  height: 124px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ring-big svg {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}

.ring-big .r-bg {
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 10;
}

.ring-big .r-val {
  stroke: #fff;
  stroke-width: 10;
  stroke-dasharray: 314.16;
  stroke-dashoffset: 314.16;
  transition: stroke-dashoffset 1.6s var(--ease);
}

.ring-big.is-in .r-val {
  stroke-dashoffset: calc(314.16 - 314.16 * var(--v) / 10);
}

.ring-big b {
  position: relative;
  font-size: 30px;
  line-height: 1;
}

.ring-big span {
  position: relative;
  margin-top: 4px;
  font-size: 11px;
  opacity: 0.8;
}

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

.bars div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  font-size: 14px;
}

.bars i {
  grid-column: 1 / -1;
  grid-row: 2;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  position: relative;
  overflow: hidden;
}

.bars i::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #93c5fd, #fff);
  transition: width 1.4s var(--ease);
}

.report.is-in .bars i::after {
  width: var(--w);
}

.report__lines p {
  margin: 0 0 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
}

.report__doc {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 14px;
  font-weight: 700;
}

.report__doc em {
  margin-left: auto;
  font-style: normal;
  font-weight: 600;
  opacity: 0.7;
  font-size: 12px;
}

.doc-ico {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #2b579a;
  color: #fff;
  font-weight: 900;
}

@media (min-width: 980px) {
  .result {
    grid-template-columns: 1fr 1fr;
    gap: 72px;
  }
}

/* цены */

.plans {
  display: grid;
  gap: 18px;
  margin-top: 48px;
  align-items: stretch;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.plan h3 {
  font-size: 19px;
}

.plan__price {
  margin: 14px 0 18px;
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.plan__price small {
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0;
}

.plan ul {
  flex: 1;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan li {
  position: relative;
  padding-left: 32px;
  color: var(--text-2);
  font-size: 15px;
}

.plan li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 900;
}

.plan--main {
  border: 2px solid transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(135deg, var(--brand), var(--sky), var(--indigo)) border-box;
  box-shadow: 0 24px 60px rgba(37, 99, 235, 0.22);
}

.plan__badge {
  position: absolute;
  top: -13px;
  left: 24px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (min-width: 900px) {
  .plans {
    grid-template-columns: 1fr 1.15fr 1fr;
  }
  .plan--main {
    transform: translateY(-12px);
  }
}

/* отзывы */

.rating {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 18px;
}

.reviews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 40px;
}

.review {
  margin: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.review__stars {
  color: #f59e0b;
  letter-spacing: 2px;
}

.review p {
  margin: 10px 0 12px;
  color: var(--text-2);
  font-size: 15px;
}

.review span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

/* FAQ */

.faq {
  display: grid;
  gap: 32px;
}

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

.faq details {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.faq details[open] {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
  box-shadow: var(--shadow);
}

.faq summary {
  position: relative;
  padding: 18px 52px 18px 20px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

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

.faq summary::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  border-radius: 50%;
  background: var(--brand-soft) center / 12px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='3.5' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
  transition: transform 0.3s var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  margin: 0;
  padding: 0 20px 20px;
  color: var(--text-2);
  font-size: 16px;
  animation: drop 0.3s var(--ease);
}

@media (min-width: 980px) {
  .faq {
    grid-template-columns: 0.8fr 1.2fr;
    gap: 64px;
  }
}

/* финальный призыв */

.cta-band {
  position: relative;
  overflow: hidden;
  margin: 0 20px 80px;
  padding: 72px 0;
  border-radius: 32px;
  background: var(--grad);
  color: #fff;
  text-align: center;
}

.cta-band__glow {
  position: absolute;
  inset: -50%;
  filter: blur(50px);
  opacity: 0.8;
  background: conic-gradient(from 0deg, transparent, rgba(56, 189, 248, 0.35), transparent 30%, rgba(99, 102, 241, 0.35), transparent 60%);
  animation: spin 16s linear infinite;
}

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

.cta-band__in {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cta-band h2 {
  text-wrap: balance;
  max-width: 760px;
  font-size: clamp(28px, 4.4vw, 44px);
  font-weight: 800;
}

.cta-band p {
  max-width: 680px;
  margin: 14px auto 28px;
  text-wrap: pretty;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.82);
}

.cta-band .hero__cta {
  justify-content: center;
}

.cta-band .btn--glass {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

@media (min-width: 1220px) {
  .cta-band {
    max-width: 1180px;
    margin: 0 auto 96px;
  }
}

/* подвал */

.footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  font-size: 15px;
}

.footer__in {
  display: grid;
  gap: 28px;
  padding-top: 48px;
  padding-bottom: 32px;
}

.footer__brand p {
  margin: 10px 0 0;
  color: var(--muted);
}

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

.footer__col strong {
  margin-bottom: 4px;
}

.footer__col a {
  color: var(--text-2);
  text-decoration: none;
}

.footer__col span {
  color: var(--muted);
}

.footer__col a:hover {
  color: var(--brand-strong);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.footer__bottom a {
  color: var(--muted);
  text-decoration: none;
}

@media (min-width: 820px) {
  .footer__in {
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  }
}

/* ---------------------------------------------------------------- появление при прокрутке */

.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--delay, 0s);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------------------------------------------------------------- юридические страницы и 404 */

.doc-page {
  padding: 48px 0 96px;
}

.doc {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px clamp(20px, 5vw, 56px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.doc h1 {
  font-size: clamp(28px, 4vw, 38px);
  margin-bottom: 8px;
}

.doc h2 {
  margin: 32px 0 10px;
  font-size: 21px;
}

.doc p,
.doc li {
  color: var(--text-2);
  font-size: 16px;
}

.doc ol,
.doc ul {
  padding-left: 22px;
}

.doc .meta {
  color: var(--muted);
  font-size: 14px;
}

.notice-box {
  margin: 20px 0 8px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--todo-bg);
  color: var(--todo);
  font-size: 15px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  font-weight: 700;
  text-decoration: none;
}

.not-found {
  min-height: calc(100vh - 70px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px 20px;
}

.not-found__code {
  font-size: clamp(90px, 20vw, 170px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
  background: var(--grad-text);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
}

.not-found p {
  color: var(--text-2);
  margin: 12px 0 26px;
}

/* ---------------------------------------------------------------- без анимаций по настройке системы */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 600px) {
  .demo__tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
  }
  .demo__tabs button {
    min-width: 0;
    padding: 10px 4px;
    font-size: 14px;
  }
  .demo__card {
    padding: 14px;
    border-radius: 22px;
  }
  .demo__empty {
    min-height: 160px;
  }
}
