/* Общие стили публичных страниц Dyrkant — soft glassmorphism */
:root, [data-theme="dark"] {
  --bg: #0a0a0c;
  --bg-elevated: #121214;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --accent: #FF3B30;
  --accent-soft: rgba(255, 59, 48, 0.16);
  --card: rgba(255, 255, 255, 0.06);
  --glass: rgba(22, 22, 26, 0.92);
  --glass-strong: rgba(28, 28, 32, 0.96);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-blur: 8px;
  --glass-inset: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --border: rgba(255, 255, 255, 0.1);
  --ok: #34d399;
  --bad: #f87171;
  --radius: 16px;
  --font: Manrope, system-ui, sans-serif;
  --theme-color: #0a0a0c;
  --shadow-soft: 0 12px 40px rgba(0, 0, 0, 0.28);
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.32);
  --mock-bg: rgba(18, 18, 20, 0.55);
  --mock-bar: rgba(26, 26, 29, 0.65);
}
[data-theme="light"] {
  --bg: #f3f2f0;
  --bg-elevated: #ffffff;
  --text: #18181b;
  --muted: #52525b;
  --accent: #e11d12;
  --accent-soft: rgba(225, 29, 18, 0.1);
  --card: rgba(255, 255, 255, 0.62);
  --glass: rgba(255, 255, 255, 0.88);
  --glass-strong: rgba(255, 255, 255, 0.94);
  --glass-border: rgba(24, 24, 27, 0.1);
  --glass-blur: 8px;
  --glass-inset: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --border: rgba(24, 24, 27, 0.1);
  --ok: #059669;
  --bad: #dc2626;
  --theme-color: #f3f2f0;
  --shadow-soft: 0 12px 36px rgba(24, 24, 27, 0.08);
  --shadow: 0 16px 40px rgba(24, 24, 27, 0.08);
  --mock-bg: rgba(255, 255, 255, 0.5);
  --mock-bar: rgba(244, 244, 245, 0.7);
}
* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: clip;
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.5;
  position: relative;
  isolation: isolate;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: clip;
}
body.is-landing {
  padding-bottom: 0;
}
@media (max-width: 860px) {
  body.is-landing { padding-bottom: 72px; }
}

/* Soft mesh — no grain */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 50% at 15% -5%, rgba(255, 59, 48, 0.24), transparent 55%),
    radial-gradient(ellipse 55% 45% at 92% 8%, rgba(120, 40, 40, 0.18), transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(40, 40, 48, 0.42), transparent 55%);
  transform-origin: center center;
}
[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse 70% 50% at 12% -5%, rgba(255, 59, 48, 0.14), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 15%, rgba(255, 180, 170, 0.28), transparent 50%),
    radial-gradient(ellipse 45% 35% at 40% 95%, rgba(220, 220, 230, 0.48), transparent 55%);
}
@keyframes mesh-breathe {
  0%, 100% { opacity: 0.82; }
  50% { opacity: 1; }
}
@keyframes orb-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(2.5%, -3%) scale(1.04); }
  66% { transform: translate(-2%, 2.5%) scale(0.97); }
}
.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.bg-orbs span {
  position: absolute;
  border-radius: 50%;
  opacity: 0.7;
  will-change: transform;
  /* Soft blob via gradient — no live filter:blur */
  background: radial-gradient(circle at 40% 40%, var(--orb-color, rgba(255, 59, 48, 0.35)), transparent 68%);
}
.bg-orbs span:nth-child(1) {
  width: min(52vw, 480px);
  height: min(52vw, 480px);
  left: -8%;
  top: 8%;
  --orb-color: rgba(255, 59, 48, 0.32);
}
.bg-orbs span:nth-child(2) {
  width: min(44vw, 400px);
  height: min(44vw, 400px);
  right: -6%;
  top: 28%;
  --orb-color: rgba(90, 30, 35, 0.5);
}
.bg-orbs span:nth-child(3) {
  width: min(48vw, 420px);
  height: min(48vw, 420px);
  left: 28%;
  bottom: -10%;
  --orb-color: rgba(50, 50, 62, 0.55);
}
[data-theme="light"] .bg-orbs span:nth-child(1) { --orb-color: rgba(255, 59, 48, 0.2); opacity: 0.85; }
[data-theme="light"] .bg-orbs span:nth-child(2) { --orb-color: rgba(255, 200, 190, 0.65); opacity: 0.8; }
[data-theme="light"] .bg-orbs span:nth-child(3) { --orb-color: rgba(200, 205, 220, 0.65); opacity: 0.75; }

@keyframes fade-up {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes soft-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); }
  50% { box-shadow: 0 0 0 8px rgba(255, 59, 48, 0.14); }
}

@keyframes hero-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  body::before {
    animation: mesh-breathe 16s ease-in-out infinite;
  }
  .bg-orbs span:nth-child(1) {
    animation: orb-drift 22s ease-in-out infinite;
  }
  .bg-orbs span:nth-child(2) {
    animation: orb-drift 28s ease-in-out infinite reverse;
    animation-delay: -6s;
  }
  .bg-orbs span:nth-child(3) {
    animation: orb-drift 34s ease-in-out infinite;
    animation-delay: -12s;
  }
  body.is-landing .hero-copy { animation: hero-enter 0.45s ease both; }
  body.is-landing .hero-visual { animation: hero-enter 0.5s ease 0.08s both; }
  .btn-primary.btn-pulse { animation: soft-pulse 3.2s ease-in-out infinite; }
  .btn-primary.btn-pulse:hover { animation: none; }
  .reveal {
    opacity: 0;
    transition: opacity 0.4s ease;
  }
  .reveal.is-visible {
    opacity: 1;
  }
  .reveal-stagger > .reveal:nth-child(1) { transition-delay: 0.04s; }
  .reveal-stagger > .reveal:nth-child(2) { transition-delay: 0.08s; }
  .reveal-stagger > .reveal:nth-child(3) { transition-delay: 0.12s; }
  .reveal-stagger > .reveal:nth-child(4) { transition-delay: 0.16s; }
}
@media (prefers-reduced-motion: reduce) {
  .bg-orbs span { will-change: auto; }
}

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-inset), var(--shadow-soft);
}
.glass-strong {
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-inset), var(--shadow-soft);
}

.wrap, .site-center, .page {
  position: relative;
  z-index: 1;
}
.wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 16px 20px 56px;
}
body.is-landing .wrap {
  max-width: 1080px;
  padding: 16px 20px 56px;
}
.site-top {
  position: sticky;
  top: 0;
  z-index: 30;
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 20px 0;
}
.site-top--inner {
  max-width: 800px;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 0;
  padding: 10px 12px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--glass-inset), 0 8px 28px rgba(0, 0, 0, 0.18);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}
.brand img,
.logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: contain;
  background: #000;
  display: block;
}
.brand strong {
  display: block;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.brand span {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 650;
}
.nav-end {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  min-width: 0;
  flex: 1 1 auto;
  justify-content: flex-end;
}
.nav-links {
  display: flex;
  gap: 2px;
  flex-wrap: nowrap;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
  justify-content: center;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
  padding: 7px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}
.nav-links a.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}
[data-theme="light"] .nav-links a.is-active {
  background: rgba(0, 0, 0, 0.05);
}
.nav-actions {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  align-items: center;
  flex-shrink: 0;
}
.nav-actions .btn {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 13px;
}
.nav-actions .theme-toggle {
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
}
.nav-text-short { display: none; }
.mobile-nav {
  display: none;
  gap: 8px;
  margin: 10px 0 0;
  padding-bottom: 4px;
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.mobile-nav::-webkit-scrollbar { display: none; }
.mobile-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 650;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  white-space: nowrap;
  flex-shrink: 0;
}
.mobile-cta {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg-elevated) 92%, transparent);
  border-top: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.25);
}
.mobile-cta .btn { width: 100%; }
.theme-toggle {
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 999px;
  font-size: 16px;
  line-height: 1;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease, border-color 0.2s ease;
}
.theme-toggle.is-flipping {
  transform: rotate(180deg) scale(1.08);
}
html.is-theme-fading body {
  transition: background 0.45s ease, color 0.45s ease;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  color: var(--text);
  text-decoration: none;
  background: var(--glass);
  font-weight: 650;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover {
  transform: translateY(-2px);
  background: var(--glass-strong);
}
.btn-primary {
  background: linear-gradient(135deg, #ff5249, #FF3B30);
  border-color: transparent; color: #fff;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #ff635a, #ff3b30);
}
.btn-ghost { background: transparent; }
h1 { margin: 0 0 12px; font-size: clamp(28px, 5vw, 36px); letter-spacing: -0.03em; font-weight: 800; }
.lead { margin: 0 0 28px; color: var(--muted); font-size: 16px; }
h2 { margin: 28px 0 10px; font-size: 18px; font-weight: 750; }
p, li { color: var(--muted); font-size: 15px; }
ul, ol { padding-left: 20px; }
li { margin: 8px 0; }
.section { scroll-margin-top: 24px; }
body.is-landing .section { scroll-margin-top: 110px; }
.card {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--glass);
  margin: 12px 0;
  box-shadow: var(--glass-inset), var(--shadow-soft);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.card:hover {
  transform: translateY(-2px);
  background: var(--glass-strong);
  border-color: rgba(255, 59, 48, 0.22);
}
.card strong { color: var(--text); }
.footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  display: grid;
  gap: 12px;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.footer a { color: var(--accent); text-decoration: none; font-weight: 650; }
a.inline { color: var(--accent); font-weight: 650; }
details.faq {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 12px 16px;
  background: var(--glass);
  margin-bottom: 10px;
  box-shadow: var(--glass-inset);
  transition: border-color 0.2s ease, background 0.2s ease;
}
details.faq:hover { background: var(--glass-strong); }
details.faq summary { cursor: pointer; font-weight: 700; color: var(--text); }
details.faq p { margin: 10px 0 0; }
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 18px 0 28px;
}
.stat {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--glass);
  text-align: center;
  box-shadow: var(--glass-inset);
  transition: transform 0.2s ease;
}
.stat:hover { transform: translateY(-2px); }
.stat strong { display: block; font-size: 28px; color: var(--text); font-weight: 800; }
.stat span { font-size: 12px; color: var(--muted); font-weight: 650; }
.news-item { margin-bottom: 14px; }
.news-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.news-version {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3px 8px;
  border-radius: 999px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.news-item .tag {
  display: inline-block; font-size: 11px; font-weight: 700; color: var(--accent);
  background: var(--accent-soft); padding: 3px 8px; border-radius: 999px; margin-bottom: 6px;
}
.news-item h3 { margin: 0 0 6px; font-size: 16px; color: var(--text); }
.news-category { margin-top: 10px; }
.news-category h4 {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.news-category ul {
  margin: 0 0 8px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
}
.quote { color: var(--text); font-size: 15px; margin: 0 0 8px; }
.quote-meta { font-size: 13px; color: var(--muted); }

/* Payment / centered status pages */
.site-center {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.site-center .card {
  max-width: 440px;
  width: 100%;
  margin: 0;
  padding: 28px;
  border-radius: 20px;
}
.site-center h1 { margin: 0 0 10px; font-size: 28px; color: var(--text); }
.site-center p { color: var(--muted); line-height: 1.5; }
.site-center .btn { margin-top: 12px; margin-right: 8px; min-height: 44px; padding: 12px 18px; }
.site-center .btn-ghost {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text);
}

/* Checklist print page */
.checklist-page { max-width: 720px; margin: 32px auto; padding: 0 20px 48px; }
.checklist-page .sub { color: var(--muted); margin-bottom: 28px; }
.checklist-page .print { margin: 20px 0; }
.checklist-page button.btn { cursor: pointer; }

/* Mobile */
@media (max-width: 980px) {
  .brand span { display: none; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-end { flex: 0 0 auto; margin-left: auto; }
  .nav-text-full { display: none; }
  .nav-text-short { display: inline; }
  body.is-landing .mobile-cta { display: block; }
  body.is-landing .mobile-nav { display: flex; }
  .nav-actions .btn-ghost:not(.theme-toggle) {
    min-height: 40px;
    padding: 8px 12px;
    font-size: 12px;
  }
  .card .btn,
  .site-center .btn {
    width: 100%;
    margin-right: 0;
  }
  .card .btn + .btn { margin-top: 8px; }
}
@media (min-width: 861px) {
  .mobile-nav { display: none !important; }
}
@media (max-width: 640px) {
  .wrap,
  body.is-landing .wrap {
    padding: 12px 14px 40px;
  }
  .site-top,
  .site-top--inner {
    padding-left: 14px;
    padding-right: 14px;
  }
  h1 { font-size: clamp(26px, 7vw, 32px); }
  .nav { gap: 8px; }
  .nav-actions .btn-ghost[href="/app/#/login"],
  .nav-actions .btn-ghost[href="/app/"] {
    padding: 8px 10px;
  }
}
@media print {
  body::before, .bg-orbs { display: none; }
  .checklist-page .print { display: none; }
  .checklist-page { margin: 0; }
}

@media (max-width: 480px) {
  .card .btn,
  .checklist-page .btn,
  .site-cta .btn {
    min-height: 44px;
    padding: 12px 16px;
    font-size: 16px;
  }
}
