:root {
  --ink: #1a1e1c;
  --ink-soft: #3d4a44;
  --muted: #5c6b64;
  --paper: #f4f8f6;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.9);
  --line: rgba(0, 107, 95, 0.14);
  --teal: #006b5f;
  --teal-deep: #004d44;
  --cyan: #6be6d4;
  --foam: #e4f5f1;
  --ok: #1f8a6e;
  --shadow: 0 20px 50px rgba(0, 107, 95, 0.1);
  --radius: 22px;
  --font: "Onest", system-ui, sans-serif;
  --display: "Unbounded", "Onest", system-ui, sans-serif;
  --max: 1080px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1100px 640px at 88% -12%, rgba(107, 230, 212, 0.35), transparent 55%),
    radial-gradient(900px 580px at -12% 15%, rgba(0, 107, 95, 0.14), transparent 50%),
    radial-gradient(700px 400px at 50% 100%, rgba(228, 245, 241, 0.85), transparent 60%),
    linear-gradient(180deg, #e8f3ef 0%, var(--paper) 38%, #eef5f2 100%);
  min-height: 100vh;
  line-height: 1.55;
}

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

a {
  color: var(--teal-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--teal);
}

.wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(247, 252, 254, 0.7);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(247, 252, 254, 0.88);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--teal-deep);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(13, 119, 158, 0.28);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--teal);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1.35rem;
  border-radius: 14px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #004d44 0%, #006b5f 52%, #28b8a4 130%);
  box-shadow: 0 12px 30px rgba(0, 107, 95, 0.28);
}

.btn-primary:hover {
  color: #fff;
  box-shadow: 0 16px 36px rgba(13, 119, 158, 0.38);
}

.btn-ghost {
  color: var(--teal-deep);
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(13, 119, 158, 0.22);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  color: var(--teal);
  background: #fff;
}

.hero {
  position: relative;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5rem);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.hero-copy {
  position: relative;
  z-index: 1;
  padding: 1.35rem 1.4rem 1.45rem;
  border-radius: calc(var(--radius) + 4px);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-kicker {
  display: inline-block;
  margin: 0 0 0.85rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: var(--foam);
  color: var(--teal-deep);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.hero h1 {
  margin: 0 0 0.9rem;
  font-family: var(--display);
  font-size: clamp(2.5rem, 6vw, 4.3rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 700;
  color: var(--teal-deep);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.hero-lead {
  margin: 0 0 1.6rem;
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 2.2vw, 1.18rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-visual {
  position: relative;
  min-height: 340px;
  display: grid;
  place-items: center;
}

.glass-orb {
  position: absolute;
  inset: 6% 8%;
  border-radius: 40% 60% 55% 45% / 45% 40% 60% 55%;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.9), transparent 42%),
    linear-gradient(145deg, rgba(78, 196, 224, 0.55), rgba(13, 119, 158, 0.35));
  filter: blur(1px);
  animation: drift 12s ease-in-out infinite alternate;
  opacity: 0.95;
}

.phone-frame {
  position: relative;
  width: min(260px, 70%);
  aspect-ratio: 9 / 17;
  border-radius: 36px;
  padding: 12px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.85), rgba(220, 244, 252, 0.45));
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  animation: rise 1.1s ease both;
}

.phone-screen {
  height: 100%;
  border-radius: 26px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 28%),
    linear-gradient(180deg, #1a1e1c, #006b5f 52%, #6be6d4);
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.phone-screen img {
  width: 58%;
  border-radius: 22%;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

.section {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.section h2 {
  margin: 0 0 0.75rem;
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.03em;
  color: var(--ink);
}

.section-lead {
  margin: 0 0 2rem;
  max-width: 40rem;
  color: var(--ink-soft);
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.feature {
  padding: 1.25rem 1.3rem;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 10px 28px rgba(13, 119, 158, 0.06);
  backdrop-filter: blur(12px);
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.feature:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 16px 36px rgba(13, 119, 158, 0.1);
}

.feature h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  color: var(--teal-deep);
}

.feature p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.plan {
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 28px rgba(13, 119, 158, 0.05);
}

.plan.pro {
  background: linear-gradient(160deg, rgba(78, 196, 224, 0.18), rgba(255, 255, 255, 0.92));
  border-color: rgba(13, 119, 158, 0.25);
  box-shadow: 0 14px 34px rgba(13, 119, 158, 0.1);
}

.plan h3 {
  margin: 0 0 0.35rem;
  font-family: var(--display);
  font-size: 1.25rem;
  color: var(--ink);
}

.plan .price {
  margin: 0 0 0.75rem;
  color: var(--teal);
  font-weight: 700;
}

.plan ul {
  margin: 1rem 0 0;
  padding-left: 1.1rem;
  color: var(--ink-soft);
}

.plan li + li {
  margin-top: 0.35rem;
}

.note {
  margin-top: 1rem;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #c5d4db;
  color: #111827;
  font-size: 0.95rem;
}

.note a {
  color: #0f172a;
  font-weight: 700;
  text-decoration: underline;
}

.site-footer {
  margin-top: 2rem;
  padding: 2rem 0 2.5rem;
  border-top: 1px solid #c5d4db;
  color: #1f2937;
  font-size: 0.95rem;
  background: #f8fafb;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-grid strong {
  color: #0f172a;
  font-family: var(--display);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
}

.footer-links a {
  color: #0f172a;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-links a:hover {
  color: #000;
}

.legal {
  padding: 2rem 0 3.5rem;
}

.legal-card {
  padding: clamp(1.4rem, 3vw, 2.25rem);
  border-radius: calc(var(--radius) + 4px);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.legal h1 {
  margin: 0 0 0.5rem;
  font-family: var(--display);
  font-size: clamp(1.25rem, 6.2vw, 2.3rem);
  letter-spacing: -0.03em;
  color: var(--teal-deep);
  line-height: 1.2;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.legal .meta {
  margin: 0 0 1.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.legal h2 {
  margin: 1.75rem 0 0.6rem;
  font-size: 1.2rem;
  color: var(--ink);
}

.legal p,
.legal li {
  color: var(--ink-soft);
}

.legal ul {
  padding-left: 1.2rem;
}

.placeholder {
  display: inline;
  padding: 0.05em 0.35em;
  border-radius: 6px;
  background: #fff3cd;
  color: #6b5200;
  font-weight: 600;
  white-space: nowrap;
}

.buy-hero {
  margin-bottom: 1rem;
}

.buy-lead {
  margin: 0;
  max-width: 40rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.buy-plans {
  margin: 1rem 0;
}

.price-hint {
  color: var(--muted);
  font-size: 0.85em;
  font-weight: 500;
}

.buy-terms {
  margin-top: 0.25rem;
}

.buy-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 1rem;
  color: var(--ink-soft);
  cursor: pointer;
}

.buy-consent input {
  margin-top: 0.3rem;
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--teal);
  flex-shrink: 0;
}

.buy-steps {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
  color: var(--ink-soft);
}

.buy-steps li + li {
  margin-top: 0.4rem;
}

.pay-btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pay-btn {
  width: 100%;
}

.yookassa-embed {
  margin-top: 0;
}

.yookassa-embed.is-disabled {
  opacity: 0.45;
  filter: grayscale(0.15);
}

.yookassa-embed .yoomoney-payment-form {
  margin: 0;
}

/* Цена уже в карточке — блок «Товары» скрываем, hidden-поля оставляем */
.yookassa-embed .ym-products-title,
.yookassa-embed .ym-product-line {
  display: none;
}

.yookassa-embed .ym-customer-info .ym-block-title {
  display: none;
}

.yookassa-embed .ym-customer-info {
  margin-bottom: 0.65rem;
}

/* ЮKassa: height:32px + padding-top:20px — кнопка наползала на список.
   Сверху −20px, снизу +20px; height:auto чтобы отступ снизу учитывался. */
.yookassa-embed .yoomoney-payment-form .ym-payment-btn-block {
  margin-top: 12px;
  padding-bottom: 20px;
  height: auto;
  min-height: 32px;
}

.buy-action {
  margin: 1rem 0;
  border: 1px solid rgba(13, 119, 158, 0.35);
  background: rgba(232, 248, 255, 0.95);
}

.buy-action.is-visible {
  animation: rise 0.35s ease both;
}

.buy-action .note {
  margin-top: 0;
}

.buy-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.buy-consent.is-attention {
  outline: 2px solid var(--accent, #3d8bfd);
  outline-offset: 4px;
  border-radius: 8px;
}

.buy-copy-email {
  display: inline-flex;
  margin-top: 0.75rem;
  width: auto;
  padding: 0.45rem 0.85rem;
  font-size: 0.9rem;
}

.thanks-card {
  max-width: 40rem;
}

.thanks-kicker {
  margin: 0 0 0.35rem;
  color: var(--ok);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.thanks-list {
  margin: 1.25rem 0 1.5rem;
  padding-left: 1.2rem;
  color: var(--ink-soft);
}

.thanks-list li + li {
  margin-top: 0.45rem;
}

@keyframes drift {
  from { transform: rotate(-4deg) scale(1); }
  to { transform: rotate(5deg) scale(1.06); }
}

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

@media (max-width: 860px) {
  .hero-grid,
  .feature-list,
  .compare {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  .hero-visual {
    min-height: 300px;
    order: -1;
  }

  .phone-frame {
    width: min(220px, 58%);
  }

  .download-grid {
    grid-template-columns: 1fr;
  }
}

/* —— App / guide pages —— */

.app-hero {
  padding-bottom: 1.5rem;
}

.app-hero-card {
  max-width: 42rem;
  padding: 1.5rem 1.5rem 1.6rem;
  border-radius: calc(var(--radius) + 4px);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.app-version-note {
  margin: 0.9rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.shot-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 160px));
  justify-content: start;
  gap: 1rem;
  padding: 0.25rem 0 0.5rem;
}

.shot-card {
  width: 160px;
  max-width: 100%;
  margin: 0;
}

.shot-thumb {
  display: block;
  width: 160px;
  max-width: 100%;
  height: 280px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #d7eef7;
  cursor: zoom-in;
  box-shadow: 0 10px 28px rgba(13, 119, 158, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.shot-thumb:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(13, 119, 158, 0.2);
}

.shot-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: top center;
  background: #d7eef7;
}

.shot-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 1rem;
  white-space: pre-wrap;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  background: linear-gradient(160deg, #e8f8ff, #d4eef8);
}

.shot-card figcaption {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.3;
}

.shot-lightbox {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: 100vw;
  height: 100%;
  height: 100dvh;
  max-height: 100%;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(8, 40, 52, 0.92);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shot-lightbox:not([open]) {
  display: none;
}

.shot-lightbox::backdrop {
  background: rgba(8, 40, 52, 0.85);
}

.shot-lightbox-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-width: 100%;
  padding: 3.25rem 1rem 2rem;
  box-sizing: border-box;
  touch-action: pan-y;
}

.shot-lightbox img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(92vw, 420px);
  max-height: min(78vh, 78dvh);
  margin: 0 auto;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  background: #0a3040;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.shot-lightbox-caption {
  margin: 0.75rem 0 0;
  max-width: min(92vw, 420px);
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.88);
}

.shot-lightbox-close,
.shot-lightbox-nav {
  position: absolute;
  z-index: 2;
  border: none;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  cursor: pointer;
  border-radius: 12px;
  backdrop-filter: blur(8px);
  -webkit-tap-highlight-color: transparent;
}

.shot-lightbox-close {
  top: max(0.75rem, env(safe-area-inset-top));
  right: max(0.75rem, env(safe-area-inset-right));
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.6rem;
  line-height: 1;
}

.shot-lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.5rem;
  line-height: 1;
}

.shot-lightbox-prev {
  left: max(0.5rem, env(safe-area-inset-left));
}

.shot-lightbox-next {
  right: max(0.5rem, env(safe-area-inset-right));
}

.shot-lightbox-close:hover,
.shot-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.28);
}

.shot-lightbox-nav[hidden] {
  display: none !important;
}

@media (max-width: 560px) {
  .shot-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .shot-card,
  .shot-thumb {
    width: 100%;
  }

  .shot-thumb {
    height: 240px;
  }

  .shot-lightbox-inner {
    padding: 3.5rem 0.5rem 4.5rem;
  }

  .shot-lightbox img {
    max-width: 94vw;
    max-height: min(72vh, 72dvh);
  }

  .shot-lightbox-nav {
    top: auto;
    bottom: max(1rem, env(safe-area-inset-bottom));
    transform: none;
  }

  .shot-lightbox-prev {
    left: 1.25rem;
  }

  .shot-lightbox-next {
    right: 1.25rem;
  }
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.download-card h3 {
  margin: 0 0 0.5rem;
  font-family: var(--display);
  font-size: 1.15rem;
  color: var(--teal-deep);
}

.download-card p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.app-meta-line {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.md-body {
  padding: 1.5rem 1.6rem 1.7rem;
}

.md-body h1,
.md-body h2,
.md-body h3 {
  font-family: var(--display);
  color: var(--teal-deep);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.md-body h1 {
  margin: 0 0 1rem;
  font-size: 1.55rem;
}

.md-body h2 {
  margin: 1.6rem 0 0.7rem;
  font-size: 1.25rem;
}

.md-body h3 {
  margin: 1.25rem 0 0.55rem;
  font-size: 1.05rem;
}

.md-body p,
.md-body li {
  color: var(--ink-soft);
}

.md-body ul,
.md-body ol {
  margin: 0.4rem 0 1rem;
  padding-left: 1.2rem;
}

.md-body li + li {
  margin-top: 0.35rem;
}

.md-body hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 1.5rem 0;
}

.md-body code {
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: var(--foam);
}

.md-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0 1.25rem;
  font-size: 0.95rem;
}

.md-table th,
.md-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  color: var(--ink-soft);
}

.md-table th {
  background: var(--foam);
  color: var(--teal-deep);
  font-weight: 600;
}

.guide-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
}

.content-error {
  color: #a33;
}

.muted {
  color: var(--muted);
  font-size: 0.95rem;
}

.btn[hidden] {
  display: none !important;
}
