/* ═══════════════ SpriteForge — сайт (DNA приложения) ═══════════════ */
:root {
  --bg: #0a0a14;
  --panel: rgba(255, 255, 255, .05);
  --stroke: rgba(255, 255, 255, .09);
  --stroke-2: rgba(255, 255, 255, .16);
  --text: #eceaf6;
  --muted: #9d9cb6;
  --a1: #8b5cf6;
  --a2: #22d3ee;
  --a3: #f472b6;
  --grad: linear-gradient(135deg, #8b5cf6 0%, #6366f1 45%, #22d3ee 100%);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
b { font-weight: 800; }
a { color: inherit; text-decoration: none; }

/* ── живой фон ── */
.bg-fx { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(100px); opacity: .5; will-change: transform; }
.b1 { width: 560px; height: 560px; left: -160px; top: -140px; background: radial-gradient(circle, rgba(139,92,246,.55), transparent 65%); animation: drift1 26s ease-in-out infinite alternate; }
.b2 { width: 640px; height: 640px; right: -200px; top: 12%; background: radial-gradient(circle, rgba(34,211,238,.38), transparent 65%); animation: drift2 32s ease-in-out infinite alternate; }
.b3 { width: 500px; height: 500px; left: 32%; bottom: -240px; background: radial-gradient(circle, rgba(244,114,182,.30), transparent 65%); animation: drift3 38s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(90px, 60px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-70px, -90px) scale(1.1); } }
@keyframes drift3 { to { transform: translate(-110px, -50px) scale(1.18); } }
.grain { position: absolute; inset: 0; opacity: .05; background-image: repeating-conic-gradient(rgba(255,255,255,.6) 0 .00009deg, transparent 0 .00018deg); }

/* ── шапка ── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 26px;
  padding: 14px 6vw;
  background: rgba(10, 10, 20, .72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--stroke);
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 500; }
.brand b { font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo { filter: drop-shadow(0 0 12px rgba(139,92,246,.6)); animation: float 5s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-4px) rotate(-4deg); } }
.links { display: flex; gap: 22px; margin-left: auto; font-weight: 600; font-size: 14.5px; }
.links a { color: var(--muted); transition: color .25s; position: relative; }
.links a::after { content: ""; position: absolute; left: 0; bottom: -5px; width: 0; height: 2px; border-radius: 2px; background: var(--grad); transition: width .3s; }
.links a:hover { color: var(--text); }
.links a:hover::after { width: 100%; }
.top-actions { display: flex; gap: 10px; }

/* ── кнопки ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 14px; border: 1px solid transparent;
  font: 700 15px inherit; font-family: inherit; cursor: pointer;
  transition: transform .25s, box-shadow .25s, background .25s;
  white-space: nowrap;
}
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 8px 26px rgba(99, 102, 241, .4); }
.btn.primary:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 14px 40px rgba(99, 102, 241, .55); }
.btn.ghost { background: var(--panel); border-color: var(--stroke-2); color: var(--text); }
.btn.ghost:hover { transform: translateY(-2px); border-color: rgba(139, 92, 246, .6); box-shadow: 0 10px 30px rgba(139, 92, 246, .2); }
.btn.sm { padding: 9px 16px; font-size: 13.5px; border-radius: 11px; }
.btn.xl { padding: 16px 34px; font-size: 16.5px; }
.big-pulse { animation: pulseBtn 2.2s ease-in-out infinite; }
@keyframes pulseBtn { 0%, 100% { box-shadow: 0 8px 26px rgba(99,102,241,.4); } 50% { box-shadow: 0 8px 42px rgba(139,92,246,.75); } }

/* ── светлая тема ── */
body[data-theme="light"] { --bg: #f4f3fb; --panel: rgba(20, 18, 46, .045); --stroke: rgba(20, 18, 46, .1); --stroke-2: rgba(20, 18, 46, .18); --text: #1d1b2e; --muted: #5b5975; }
body[data-theme="light"] .topbar { background: rgba(244, 243, 251, .8); }
body[data-theme="light"] .blob { opacity: .34; }
body[data-theme="light"] .grain { opacity: .03; }
body[data-theme="light"] .demo-frame { box-shadow: 0 24px 60px rgba(45, 35, 100, .14), 0 0 0 1px rgba(139, 92, 246, .16); background:
    repeating-conic-gradient(rgba(29, 27, 46, .05) 0% 25%, transparent 0% 50%) 0 0 / 28px 28px,
    rgba(255, 255, 255, .5); }
body[data-theme="light"] .modal-card { background: #ffffff; }
body[data-theme="light"] .toast { background: rgba(255, 255, 255, .97); color: var(--text); }
body[data-theme="light"] .cta-card .btn.ghost { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .4); }

/* ── герой ── */
.hero { position: relative; padding: 90px 6vw 60px; text-align: center; overflow: hidden; }
.badges { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 26px; }
.badge { padding: 7px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 700; border: 1px solid var(--stroke-2); background: var(--panel); color: var(--muted); }
.badge.gold { color: #fde68a; border-color: rgba(250, 204, 21, .4); background: rgba(250, 204, 21, .08); }
.hero h1 { font-size: clamp(40px, 7vw, 76px); font-weight: 800; line-height: 1.06; letter-spacing: -1.5px; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% 200%; animation: gradShift 7s ease-in-out infinite; }
@keyframes gradShift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.lead { max-width: 640px; margin: 24px auto 0; color: var(--muted); font-size: 17.5px; line-height: 1.65; }
.cta-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }
.cta-row.center { margin-top: 26px; }
.hero-note { margin-top: 22px; color: var(--muted); font-size: 13.5px; letter-spacing: .4px; }
.hero-art { margin-top: 10px; pointer-events: none; }
.float-diamond { width: 120px; opacity: .9; filter: drop-shadow(0 0 40px rgba(139,92,246,.6)); animation: floaty 6s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-18px) rotate(6deg); } }

/* ── секции ── */
.sec { padding: 70px 6vw; max-width: 1200px; margin: 0 auto; }
.sec-title { font-size: clamp(26px, 4vw, 40px); font-weight: 800; display: flex; align-items: center; gap: 14px; letter-spacing: -.5px; }
.dot { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--grad); font-size: 24px; box-shadow: 0 10px 30px rgba(99,102,241,.45); }
.sec-sub { color: var(--muted); margin: 14px 0 38px; font-size: 16px; line-height: 1.6; max-width: 720px; }

/* ── демо ── */
.demo-frame {
  border-radius: 22px; border: 1px solid var(--stroke-2);
  padding: 18px; text-align: center;
  background:
    repeating-conic-gradient(rgba(255,255,255,.028) 0% 25%, transparent 0% 50%) 0 0 / 28px 28px,
    rgba(255,255,255,.02);
  box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 0 0 1px rgba(139,92,246,.14);
  transition: transform .5s, box-shadow .5s;
}
.demo-frame:hover { transform: translateY(-6px) scale(1.01); box-shadow: 0 40px 100px rgba(0,0,0,.6), 0 0 60px rgba(139,92,246,.22); }
.demo-frame img { max-width: 100%; border-radius: 14px; }
.demo-frame figcaption { margin-top: 14px; color: var(--muted); font-size: 13.5px; }
.demo-grid { display: grid; grid-template-columns: 1.75fr 1fr; gap: 20px; align-items: stretch; }
.demo-grid .demo-frame { margin: 0; display: flex; flex-direction: column; }
.demo-grid .demo-frame img { flex: 1; object-fit: contain; }
.gif-frame img { width: 100%; max-width: 300px; height: auto; margin: 0 auto; display: block; }
@media (max-width: 980px) { .demo-grid { grid-template-columns: 1fr; } }

/* ── фичи ── */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 18px; }
.feat {
  padding: 24px 22px; border-radius: 20px; border: 1px solid var(--stroke);
  background: var(--panel); transition: transform .35s, border-color .35s, box-shadow .35s;
  position: relative; overflow: hidden;
}
.feat::before {
  content: ""; position: absolute; inset: -60% 60% 60% -60%;
  background: radial-gradient(circle, rgba(139,92,246,.25), transparent 70%);
  opacity: 0; transition: opacity .4s; pointer-events: none;
}
.feat:hover { transform: translateY(-6px); border-color: rgba(139,92,246,.45); box-shadow: 0 24px 50px rgba(0,0,0,.4); }
.feat:hover::before { opacity: 1; }
.fi { font-size: 30px; margin-bottom: 12px; display: inline-block; transition: transform .35s; }
.feat:hover .fi { transform: scale(1.25) rotate(-8deg); }
.feat h3 { font-size: 16.5px; font-weight: 800; margin-bottom: 8px; }
.feat p { color: var(--muted); font-size: 13.8px; line-height: 1.6; }

/* ── шаги ── */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.step { position: relative; padding: 28px 24px; border-radius: 20px; background: var(--panel); border: 1px solid var(--stroke); }
.step .num {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-weight: 800; font-size: 20px; margin-bottom: 14px;
  box-shadow: 0 8px 22px rgba(99,102,241,.45);
}
.step h3 { font-size: 17px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 13.8px; line-height: 1.6; }
.step::after {
  content: "→"; position: absolute; right: -14px; top: 50%; transform: translateY(-50%);
  color: var(--a1); font-size: 22px; opacity: .55;
}
.step:last-child::after { content: none; }

/* ── CTA ── */
.cta-card {
  text-align: center; padding: 60px 30px; border-radius: 28px;
  background: var(--grad);
  box-shadow: 0 30px 90px rgba(99,102,241,.4);
  position: relative; overflow: hidden;
}
.cta-card::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(60deg, rgba(255,255,255,.05) 0 2px, transparent 2px 14px);
  animation: slideLines 12s linear infinite;
  pointer-events: none; /* декор не должен перекрывать кнопки */
}
.cta-card .cta-row { position: relative; }
@keyframes slideLines { to { transform: translateX(80px); } }
.cta-card h2 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; color: #fff; position: relative; }
.cta-card p { color: rgba(255,255,255,.85); margin: 12px 0 6px; position: relative; }
.cta-card .cta-note { color: rgba(255,255,255,.66); font-size: 12.5px; margin-top: 18px; position: relative; }
.cta-card .btn.ghost { background: rgba(10,10,22,.32); border-color: rgba(255,255,255,.35); color: #fff; }
.cta-card .btn.ghost:hover { border-color: #fff; }

/* ── футер ── */
.footer { padding: 46px 6vw 60px; text-align: center; border-top: 1px solid var(--stroke); margin-top: 40px; }
.f-brand { font-size: 20px; font-weight: 500; }
.f-brand b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ver { color: var(--muted); font-size: 12px; margin-left: 8px; }
.f-made { color: var(--muted); font-size: 13.5px; margin: 10px 0 6px; }
.f-author { color: var(--muted); font-size: 13px; }
.f-author b { color: #fde68a; }
.f-contact { margin-top: 8px; font-size: 13.5px; }
.f-mail { color: var(--a2); font-weight: 600; text-decoration: underline dotted rgba(34, 211, 238, .55); text-underline-offset: 3px; transition: color .25s; }
.f-mail:hover { color: #7de3f7; }

/* ── модалка ── */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(5, 5, 12, .68); backdrop-filter: blur(6px); animation: fadeIn .25s ease; }
.modal.hidden { display: none; }
@keyframes fadeIn { from { opacity: 0; } }
.modal-card {
  width: min(520px, 92vw); padding: 34px 30px; border-radius: 24px;
  background: #14141f; border: 1px solid var(--stroke-2); box-shadow: 0 40px 90px rgba(0,0,0,.6);
  animation: pop .3s cubic-bezier(.2, .9, .3, 1.2);
  position: relative;
}
@keyframes pop { from { opacity: 0; transform: scale(.92) translateY(12px); } }
.modal-card h3 { font-size: 20px; margin-bottom: 12px; }
.modal-card p { color: var(--muted); font-size: 14px; line-height: 1.6; margin-bottom: 14px; }
.modal-note { font-size: 12px !important; opacity: .75; }
.modal-x { position: absolute; right: 16px; top: 16px; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--stroke-2); background: var(--panel); color: var(--text); cursor: pointer; font-size: 14px; }
.modal-x:hover { background: rgba(251, 113, 133, .16); border-color: rgba(251, 113, 133, .5); }
.sup-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--stroke); background: var(--panel); margin-bottom: 8px; }
.sup-row .lbl { font-weight: 700; font-size: 13.5px; }
.sup-row .val { color: var(--muted); font-size: 12.5px; user-select: all; }

/* ── тост ── */
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, calc(100% + 60px)); z-index: 99;
  visibility: hidden;
  background: rgba(20, 20, 34, .95); border: 1px solid var(--stroke-2);
  border-left: 4px solid var(--a1); border-radius: 14px; padding: 13px 20px;
  font-size: 13.5px; font-weight: 600; max-width: 90vw;
  transition: transform .45s cubic-bezier(.2, .9, .3, 1.2), visibility .45s;
  pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); visibility: visible; }

/* ── reveal при скролле ── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .3, 1); }
.reveal.visible { opacity: 1; transform: none; }

/* ── адаптив ── */
@media (max-width: 860px) {
  .links { display: none; }
  .topbar { padding: 12px 4vw; gap: 12px; }
  .hero { padding-top: 48px; padding-left: 5vw; padding-right: 5vw; }
  .hero h1 { letter-spacing: -.5px; }
  .cta-row { gap: 12px; }
  .btn.xl { padding: 14px 24px; font-size: 15px; width: 100%; max-width: 340px; }
  .cta-row.center .btn.xl { width: 100%; }
  .sec { padding: 52px 5vw; }
  .sec-title { font-size: 26px; gap: 10px; }
  .dot { width: 42px; height: 42px; font-size: 20px; border-radius: 13px; }
  .sec-sub { font-size: 14.5px; margin-bottom: 26px; }
  .demo-grid { grid-template-columns: 1fr; gap: 16px; }
  .features { grid-template-columns: 1fr 1fr; gap: 12px; }
  .feat { padding: 18px 16px; border-radius: 16px; }
  .feat h3 { font-size: 15px; }
  .feat p { font-size: 12.8px; }
  .steps { grid-template-columns: 1fr; gap: 12px; }
  .step::after { content: "↓"; right: 50%; top: auto; bottom: -22px; transform: translateX(50%); }
  .step:last-child::after { content: none; }
  .cta-card { padding: 42px 20px; border-radius: 22px; }
  .footer { padding: 34px 5vw 44px; }
  .modal-card { padding: 26px 20px; }
  .sup-row { flex-wrap: wrap; }
  .sup-row .val { font-size: 12px; }
}
@media (max-width: 480px) {
  .badges { gap: 7px; }
  .badge { font-size: 11px; padding: 6px 11px; }
  .features { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(34px, 10vw, 44px); }
  .gif-frame img { max-width: 220px; }
  #btn-top-download { display: none; } /* в шапке на телефоне тесно; кнопки в герое остаются */
  .top-actions { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
  .reveal { opacity: 1; transform: none; }
}
