/* Смарт-пропуск (ЦИФРАСТРОЙ) — одностраничный сайт продукта.
   Стиль ООО «Цифровая оптимизация»: серый и белый + акцент индиго.
   Анимации появления включаются только при наличии JS (класс .js на <html>)
   и отключаются при prefers-reduced-motion. */
:root {
  --bg: #f2f3f5;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --card-bg: #ffffff;
  --ink: #25282d;
  --ink-2: #4a4f57;
  --muted: #6b7078;
  --line: #e1e4e8;
  --accent: #0152a3;
  --accent-ink: #013f7e;
  --accent-soft: #e6eef7;
  --accent-line: #b0c8e3;
  --accent-deep: #012f5e;
  --ok: #15803d;
  --ok-soft: #dcfce7;
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --idle: #9aa0a8;
  --tg-bg: #e4e6ee;

  --f-display: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
  --f-body: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --r-s: 10px;
  --r-m: 14px;
  --r-l: 20px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 68px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--f-body); font-size: 16px; line-height: 1.6;
  overflow-x: hidden;
}
a { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--f-display); margin: 0; letter-spacing: -0.015em; text-wrap: balance; }
p { margin: 0; }
img { max-width: 100%; }
.logo-img { mix-blend-mode: multiply; display: block; height: auto; }
.wrap {
  max-width: 1240px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- Scroll progress + header ---------- */
.scroll-progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 60; pointer-events: none; }
.scroll-progress i { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(242, 243, 245, .82); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s, background .3s;
}
.header.scrolled { border-bottom-color: var(--line); box-shadow: 0 8px 30px rgba(37, 40, 45, .06); background: rgba(255, 255, 255, .86); }
.header-in { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex: none; }
.brand .logo-img { width: 56px; }
.brand-text { display: grid; line-height: 1.2; padding-left: 12px; border-left: 1px solid var(--line); }
.brand-name { font-family: var(--f-display); font-weight: 600; font-size: 11px; letter-spacing: .05em; color: var(--ink-2); }
.brand-sub { font-size: 12px; color: var(--accent-ink); font-weight: 700; }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a {
  position: relative; text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 600;
  padding: 8px 12px; border-radius: 999px; display: flex; gap: 6px; align-items: baseline; transition: color .2s, background .2s;
}
.nav a:hover { color: var(--ink); background: rgba(37, 40, 45, .05); }
.nav a.active { color: var(--accent-ink); background: var(--accent-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 700; padding: 13px 22px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  transition: transform .2s var(--ease), box-shadow .2s, background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--accent-line); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 10px 24px -10px rgba(1, 82, 163, .7); }
.btn.primary:hover { background: var(--accent-ink); box-shadow: 0 14px 30px -10px rgba(1, 82, 163, .8); }
.btn.ghost { background: transparent; }
.btn.light { background: #fff; color: var(--accent-deep); border-color: #fff; }
.btn.sm { padding: 9px 16px; font-size: 14px; flex: none; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: calc(100vh - var(--header-h)); display: grid; align-items: center; padding: 32px 0 72px; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 420px at 78% 42%, rgba(1, 82, 163, .16), transparent 70%),
    radial-gradient(500px 360px at 10% 90%, rgba(0, 82, 165, .08), transparent 70%),
    linear-gradient(rgba(37, 40, 45, .045) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(37, 40, 45, .045) 1px, transparent 1px) 0 0 / 48px 48px;
  -webkit-mask-image: linear-gradient(#000 60%, transparent);
  mask-image: linear-gradient(#000 60%, transparent);
}
.hero-in { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 56px; align-items: center; width: 100%; }
.product { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.product-logo { width: 72px; }
.product-text { display: grid; line-height: 1.15; }
.product-text b { font-family: var(--f-display); font-weight: 700; font-size: 24px; letter-spacing: .04em; color: #0052a5; }
.product-text span { font-family: var(--f-display); font-weight: 500; font-size: 15px; color: #545454; }
.eyebrow {
  font-family: var(--f-mono); font-size: 12px; color: var(--accent-ink); letter-spacing: .02em;
  display: flex; gap: 8px; align-items: center;
}
.eyebrow .num { color: var(--muted); }
.eyebrow .num::before { content: "<"; color: var(--accent); }
.eyebrow .num::after { content: ">"; color: var(--accent); }
.hero h1 { font-size: clamp(36px, 4.6vw, 60px); line-height: 1.04; font-weight: 600; letter-spacing: -0.035em; margin-top: 14px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { font-size: 18px; color: var(--ink-2); }
.hero .lead { max-width: 64ch; }
.hero .lead { margin-top: 20px; }
.facts { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 28px; }
.fact { padding-left: 14px; border-left: 2px solid var(--accent); display: grid; }
.fact b { font-family: var(--f-display); font-weight: 300; font-size: 28px; white-space: nowrap; letter-spacing: -0.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.fact > span { font-size: 13px; color: var(--muted); }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 36px; }

.pass-stage { position: relative; display: grid; place-items: center; padding: 24px 0; }
.pass-float { animation: float 6s ease-in-out infinite; }
.pass {
  width: min(100%, 340px); background: var(--surface); border-radius: 24px;
  box-shadow: 0 2px 4px rgba(37, 40, 45, .04), 0 30px 60px -20px rgba(1, 47, 94, .35);
  padding: 30px 26px 22px; display: grid; gap: 16px; position: relative;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) rotate(-2.5deg);
  transition: transform .4s var(--ease);
}
.pass::before { content: ""; position: absolute; top: 12px; left: 50%; width: 54px; height: 9px; margin-left: -27px; border-radius: 9px; background: var(--bg); border: 1px solid var(--line); }
.pass-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-top: 6px; }
.pass-qr { position: relative; background: #fff; border-radius: 14px; padding: 14px; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.pass-qr .qr-img { width: 100%; max-width: 230px; height: auto; display: block; image-rendering: pixelated; }
.scan { position: absolute; left: 8px; right: 8px; height: 2px; top: 10%; background: var(--accent); box-shadow: 0 0 14px 2px rgba(1, 82, 163, .55); animation: scan 3.2s ease-in-out infinite; }
.pass-obj { font-family: var(--f-display); font-weight: 600; font-size: 18px; line-height: 1.25; }
.pass-meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 13px; margin: 0; }
.pass-meta dt { color: var(--muted); }
.pass-meta dd { margin: 0; font-family: var(--f-mono); }
.toast {
  position: absolute; display: flex; align-items: center; gap: 8px; white-space: nowrap;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600;
  box-shadow: 0 12px 30px -12px rgba(37, 40, 45, .25);
}
.toast b { font-family: var(--f-display); color: var(--accent); font-size: 16px; }
.toast .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.t1 { top: -1%; left: -8%; }
.t2 { bottom: 10%; right: -2%; }
.scroll-hint { position: absolute; left: 50%; bottom: 24px; width: 26px; height: 42px; margin-left: -13px; border: 2px solid var(--idle); border-radius: 14px; }
.scroll-hint i { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--accent); animation: wheel 1.8s ease-in-out infinite; }

/* ---------- Content blocks ---------- */
.block { padding: 64px 0; position: relative; }
.block.alt { background: var(--surface); --card-bg: var(--surface-2); }
.block-head { display: grid; gap: 10px; margin-bottom: 28px; }
.block-head h2 { font-size: clamp(30px, 4vw, 46px); line-height: 1.1; font-weight: 600; letter-spacing: -0.025em; }
.sub-head { font-size: 22px; font-weight: 600; margin: 36px 0 14px; }
.note { font-size: 13px; color: var(--muted); margin-top: 14px; }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.card {
  background: var(--card-bg); border-radius: var(--r-l); padding: 26px; display: grid; gap: 10px; align-content: start; min-width: 0;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -24px rgba(1, 47, 94, .35); }
.card h3 { font-size: 18px; font-weight: 600; }
.card p, .card li { color: var(--ink-2); font-size: 15px; }
.card ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.card li::marker { color: var(--accent); }
.card .k { font-family: var(--f-mono); font-size: 13px; color: var(--accent-ink); }
.ico { width: 46px; height: 46px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; }
.ico svg { width: 22px; height: 22px; }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; line-height: 1.5; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--ok); background: var(--ok-soft); }
.pill.warn { color: var(--warn); background: var(--warn-soft); }

/* Tasks */
.vs { display: grid; border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; background: var(--surface); }
.vs-row { display: grid; grid-template-columns: 280px minmax(0, 1fr); border-bottom: 1px solid var(--line); transition: background .25s; }
.vs-row:last-child { border-bottom: 0; }
.vs-row:not(.head):hover { background: var(--surface-2); }
.vs-row > div { padding: 20px 24px; min-width: 0; }
.vs-row.head > div { padding-block: 12px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
.vs-topic { font-family: var(--f-display); font-weight: 600; font-size: 16px; }
.vs-after { font-size: 15px; border-left: 1px solid var(--line); color: var(--ink-2); }
.vs-after b { color: var(--accent-ink); font-weight: 700; }

/* Roles matrix */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; color: var(--muted); font-weight: 700; background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .2s; }
tbody tr:hover { background: var(--surface-2); }
.matrix td:first-child { white-space: normal; min-width: 260px; }
.matrix .c { text-align: center; width: 130px; }
.yes { color: var(--accent); font-weight: 700; font-size: 16px; }
.part { color: var(--warn); font-size: 12px; font-weight: 700; }
.no { color: var(--idle); }

/* Processes */
.procs { display: grid; gap: 12px; }
.proc {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; align-items: center;
  padding: 24px 28px; border-radius: var(--r-l); background: var(--card-bg); border: 1px solid transparent;
  transition: border-color .3s, transform .3s var(--ease);
}
.proc:hover { border-color: var(--accent-line); transform: translateX(4px); }
.proc .n { font-family: var(--f-display); font-weight: 600; font-size: 16px; color: #fff; background: var(--accent); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; }
.proc h3 { font-size: 20px; font-weight: 600; }
.proc p { color: var(--ink-2); font-size: 15px; margin-top: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { font-size: 13px; font-weight: 600; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); }
.chip.end { background: var(--accent); border-color: var(--accent); color: #fff; }
.to { color: var(--muted); font-size: 14px; }
.tg { background: var(--tg-bg); border-radius: var(--r-m); padding: 12px; }
.tg-msg { background: #fff; border-radius: 14px 14px 14px 4px; padding: 10px 14px; font-size: 13px; line-height: 1.5; max-width: 380px; }
.tg-msg .who { color: var(--accent-ink); font-weight: 700; font-size: 12px; margin-bottom: 2px; }
.tg-msg .time { font-size: 11px; color: var(--muted); text-align: right; font-family: var(--f-mono); }

/* Features */
.now { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 16px; }
.now > div { background: var(--card-bg); border-radius: var(--r-l); padding: 24px; display: grid; gap: 10px; align-content: start; }
.now h4 { font-size: 17px; font-weight: 600; }
.now ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); }
.now li { display: grid; grid-template-columns: 18px 1fr; gap: 6px; }
.now li::before { content: "✓"; color: var(--accent); font-weight: 700; }
.ideas { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 12px; margin-top: 18px; }
.idea {
  background: var(--card-bg); border: 1px dashed var(--accent-line); border-radius: var(--r-l); padding: 18px 20px; display: grid; gap: 6px; align-content: start;
  transition: border-color .25s, background .25s, transform .3s var(--ease);
}
.idea:hover { border-style: solid; border-color: var(--accent); transform: translateY(-3px); }
.idea h4 { font-size: 16px; font-weight: 600; }
.idea p { font-size: 14px; color: var(--ink-2); }
.platform {
  margin-top: 36px; padding: 28px 32px; border-radius: var(--r-l); background: var(--accent-soft);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center;
}
.platform h3 { font-size: 22px; font-weight: 600; }
.platform p { color: var(--ink-2); margin-top: 6px; }
.platform-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.platform-tags span { font-size: 14px; font-weight: 600; padding: 7px 15px; border-radius: 999px; background: #fff; color: var(--accent-deep); }

/* Launch */
.stages { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.stages::before {
  content: ""; position: absolute; top: 21px; left: 22px; right: 0; height: 2px; background: var(--accent-line);
  transform-origin: 0 50%; transition: transform 1.4s var(--ease) .2s;
}
.stg { position: relative; display: grid; gap: 8px; align-content: start; }
.stg > b {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff;
  font-family: var(--f-display); font-weight: 600; font-size: 16px; box-shadow: 0 0 0 6px var(--surface); margin-bottom: 8px;
}
.stg h3 { font-size: 19px; font-weight: 600; }
.stg .dur { font-family: var(--f-mono); font-size: 13px; color: var(--accent-ink); }
.stg p { font-size: 14px; color: var(--ink-2); }

/* Final CTA + footer */
.final { background: var(--accent-deep); color: #fff; padding: 72px 0; position: relative; overflow: hidden; }
.final::before { content: ""; position: absolute; inset: 0; background: radial-gradient(700px 400px at 50% 0%, rgba(40, 130, 220, .45), transparent 70%); pointer-events: none; }
.final-in { position: relative; display: grid; justify-items: center; text-align: center; gap: 18px; }
.final-logo { width: 64px; height: auto; background: #fff; border-radius: 16px; padding: 10px; box-sizing: content-box; }
.final h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 600; letter-spacing: -0.025em; }
.final p { font-size: 18px; opacity: .85; max-width: 52ch; }
.final .btn { margin-top: 10px; }
.footer { background: var(--surface); border-top: 1px solid var(--line); padding: 28px 0; }
.footer-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer .logo-img { width: 180px; }
.tagline { font-size: 11px; letter-spacing: .18em; color: var(--muted); }
.tagline span { color: var(--accent); margin: 0 8px; }
.keys { font-size: 12px; color: var(--muted); font-family: var(--f-mono); }

/* ---------- Motion ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease) var(--d, 0s), transform .8s var(--ease) var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }
.js .stages:not(.in)::before { transform: scaleX(0); }
.js .stages .stg { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .stages.in .stg { opacity: 1; transform: none; }
.js .stages.in .stg:nth-child(2) { transition-delay: .25s; }
.js .stages.in .stg:nth-child(3) { transition-delay: .5s; }
.js .stages.in .stg:nth-child(4) { transition-delay: .75s; }
.js .intro > * { animation: rise .9s var(--ease) both; }
.js .intro > :nth-child(2) { animation-delay: .08s; }
.js .intro > :nth-child(3) { animation-delay: .16s; }
.js .intro > :nth-child(4) { animation-delay: .24s; }
.js .intro > :nth-child(5) { animation-delay: .32s; }
.js .intro > :nth-child(6) { animation-delay: .4s; }
.js .pass-stage { animation: rise 1.1s var(--ease) .3s both; }
.js .toast { animation: pop .7s var(--ease) both; }
.js .t1 { animation-delay: 1s; }
.js .t2 { animation-delay: 1.3s; }

@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes scan { 0%, 100% { top: 8%; } 50% { top: 90%; } }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

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

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .brand-text { display: none; }
}
@media (max-width: 900px) {
  .nav { display: none; }
  .header-in { justify-content: space-between; }
  .hero { min-height: 0; padding: 40px 0 80px; }
  .hero-in { grid-template-columns: 1fr; gap: 32px; }
  .t1 { left: 0; } .t2 { right: 0; }
  .scroll-hint { display: none; }
  .block { padding: 48px 0; }
  .vs-row { grid-template-columns: 1fr; }
  .vs-row.head { display: none; }
  .vs-row > div { padding: 6px 18px; }
  .vs-topic { padding-top: 16px !important; }
  .vs-after { border-left: 0; padding-bottom: 16px !important; }
  .proc { grid-template-columns: 44px minmax(0, 1fr); gap: 12px 16px; padding: 20px; }
  .proc .vis { grid-column: 2; }
  .platform { grid-template-columns: 1fr; padding: 24px; }
  .stages { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .stages::before { display: none; }
  .final { padding: 56px 0; }
  .keys { display: none; }
}
@media (max-width: 560px) {
  :root { --header-h: 60px; }
  .lead { font-size: 16px; }
  .stages { grid-template-columns: 1fr; }
  .fact b { font-size: 26px; }
  .facts { gap: 18px; }
  .toast { font-size: 12px; padding: 6px 12px; }
}
