/* Лендинг Opskey.
   Токены те же, что в приложении, — обложка и рабочая среда должны
   читаться одним продуктом. Копия намеренная: лендинг собирается
   отдельно и не зависит от сборки приложения. */
:root {
  --bg: #eef0f4;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --surface-hover: #f2f4f8;
  --border: #e5e8ee;
  --border-strong: #d6dbe4;
  --divider: #eef0f4;
  --text: #141821;
  --text-2: #4b5563;
  --text-muted: #8b93a1;
  --text-faint: #aab0bc;
  --graphite: #3c434b;
  --navy: #1e3a8a;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #eef3ff;
  --primary-ring: rgba(37, 99, 235, 0.2);
  --red: #dc2626;
  --red-soft: #fdecec;
  --amber: #b45309;
  --amber-soft: #fdf1e3;
  --violet: #6d28d9;
  --violet-soft: #f3edfe;
  --green: #15803d;
  --green-soft: #e8f6ee;
  --slate: #5b6472;
  --slate-soft: #eef0f3;
  --rail: #20252d;
  --rail-2: #272d37;
  --rail-line: #333b47;
  --rail-text: #c4cbd6;
  --rail-muted: #7d8794;
  --rail-active: #2e3742;
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 8px;
  --r-xl: 14px;
  --r-full: 999px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --shadow-lg: 0 24px 60px -18px rgba(20, 24, 33, 0.28);
  --shadow-md: 0 8px 24px -10px rgba(20, 24, 33, 0.2);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 660px; }

/* Спрайт с иконками не показываем — из него берут через <use>. */
.sprite { display: none; }

/* Иконки: контур цветом текста, поэтому один значок годится всюду. */
.i {
  width: 1em; height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ===== Шапка ===== */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.nav.stuck { border-bottom-color: var(--border); box-shadow: var(--shadow-md); }
.nav-in { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; text-decoration: none; }
.logo-ops { color: var(--graphite); }
.logo-key { color: var(--primary); }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a {
  position: relative;
  color: var(--text-2); text-decoration: none; font-size: 14px; font-weight: 500;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -4px; height: 2px;
  background: var(--primary); border-radius: 2px; transition: right 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { right: 0; }

/* ===== Кнопки ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px;
  border: 1px solid transparent; border-radius: var(--r-md);
  font-family: inherit; font-size: 14px; font-weight: 600;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 0.12s, background 0.12s, box-shadow 0.12s;
}
.btn .i { width: 15px; height: 15px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; }
.btn-primary {
  background: var(--primary); color: #fff;
  box-shadow: 0 6px 18px -6px rgba(37, 99, 235, 0.6);
}
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); transform: translateY(-1px); }

/* ===== Первый экран ===== */
.hero { position: relative; overflow: hidden; padding: 72px 0 84px; background: var(--surface); border-bottom: 1px solid var(--border); }
.hero-glow {
  position: absolute; top: -260px; right: -180px; width: 760px; height: 620px;
  background: radial-gradient(closest-side, rgba(37, 99, 235, 0.16), transparent 70%);
  pointer-events: none;
}
.hero-in {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 44px; align-items: center;
}

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 28px; padding: 0 12px; margin-bottom: 18px;
  border: 1px solid var(--border-strong); border-radius: var(--r-full);
  background: var(--surface-2);
  font-size: 12px; font-weight: 600; color: var(--text-2);
}
.pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 0 rgba(21, 128, 61, 0.5);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(21, 128, 61, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(21, 128, 61, 0); }
  100% { box-shadow: 0 0 0 0 rgba(21, 128, 61, 0); }
}

.hero h1 {
  margin: 0 0 16px;
  font-size: 48px; line-height: 1.08; font-weight: 800; letter-spacing: -0.035em;
}
.grad {
  background: linear-gradient(95deg, var(--primary), #7c3aed 60%, #0ea5e9);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.lead { margin: 0 0 26px; max-width: 520px; font-size: 17px; color: var(--text-2); }
.hero-acts { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.hero-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hero-facts li {
  display: flex; align-items: center; gap: 9px;
  font-size: 14px; color: var(--text-2);
}
.hero-facts .i { width: 15px; height: 15px; color: var(--green); stroke-width: 2.6; }

/* ===== Макет приложения ===== */
.shot {
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: perspective(1400px) rotateY(-7deg) rotateX(2deg);
  transition: transform 0.5s ease;
}
.hero-shot:hover .shot { transform: perspective(1400px) rotateY(-2deg) rotateX(0deg); }
.shot-bar {
  display: flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px;
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.shot-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.shot-url {
  margin-left: 10px; padding: 2px 10px;
  border-radius: var(--r-full); background: var(--surface);
  border: 1px solid var(--border);
  font-size: 10px; color: var(--text-muted);
}
.shot-app { display: grid; grid-template-columns: 132px minmax(0, 1fr); min-height: 268px; }

.m-rail { background: var(--rail); padding: 12px 8px; }
.m-logo { font-size: 13px; font-weight: 800; color: #e6e9ee; padding: 0 6px 10px; letter-spacing: -0.02em; }
.m-logo .k { color: #93adf0; }
.m-grp {
  font-size: 8px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--rail-muted); padding: 6px 6px 4px;
}
.m-view {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 7px; margin-bottom: 2px; border-radius: var(--r-sm);
  font-size: 10.5px; color: var(--rail-text); white-space: nowrap;
}
.m-view .i { width: 11px; height: 11px; color: var(--rail-muted); }
.m-view.on { background: var(--rail-active); color: #fff; }
.m-view.on .i { color: #93adf0; }
.m-view b { margin-left: auto; font-size: 9.5px; color: var(--rail-muted); font-variant-numeric: tabular-nums; }
.m-view b.hot { color: #f0a3a3; }
.m-view b.warn { color: #e3b877; }

.m-main { background: var(--bg); min-width: 0; }
.m-head {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 13px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.m-title { font-size: 12.5px; font-weight: 700; }
.m-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px; border-radius: var(--r-full);
  background: var(--red-soft); color: var(--red);
  font-size: 9px; font-weight: 700;
}
.m-badge .i { width: 9px; height: 9px; }
.m-rows { padding: 10px; display: grid; gap: 6px; }
.m-row {
  display: grid; grid-template-columns: 3px 26px minmax(0, 1fr) auto auto;
  align-items: center; gap: 7px;
  height: 34px; padding-right: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  overflow: hidden;
}
.pb { height: 100%; width: 3px; border-radius: 2px 0 0 2px; }
.pb.urgent { background: var(--red); }
.pb.high { background: #ea580c; }
.pb.normal { background: var(--primary); }
.pb.low { background: #c2c8d2; }
.m-id { font-size: 9.5px; font-weight: 700; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.m-tx { font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-st {
  padding: 2px 7px; border-radius: var(--r-full);
  font-size: 9px; font-weight: 700; white-space: nowrap;
}
.m-st.new { background: var(--primary-soft); color: var(--primary); }
.m-st.prog { background: var(--amber-soft); color: var(--amber); }
.m-st.wait { background: var(--violet-soft); color: var(--violet); }
.m-st.res { background: var(--green-soft); color: var(--green); }
.m-sla {
  font-size: 9.5px; font-weight: 600; white-space: nowrap;
  font-variant-numeric: tabular-nums; color: var(--text-2);
  padding: 2px 7px; border-radius: var(--r-full);
}
.m-sla.breach { background: var(--red-soft); color: var(--red); font-weight: 700; }
.m-sla.soon { background: var(--amber-soft); color: var(--amber); }
.m-sla.none { color: var(--text-faint); }

/* ===== Секции ===== */
.section { padding: 78px 0; }
.sec-head { margin-bottom: 34px; }
.sec-head h2 { margin: 0 0 6px; font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.sec-sub { margin: 0; color: var(--text-muted); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 22px;
  transition: transform 0.16s, box-shadow 0.16s, border-color 0.16s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.card .ic {
  width: 38px; height: 38px; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--primary-soft); color: var(--primary);
}
.card .ic .i { width: 19px; height: 19px; }
.ic-amber { background: var(--amber-soft) !important; color: var(--amber) !important; }
.ic-violet { background: var(--violet-soft) !important; color: var(--violet) !important; }
.ic-green { background: var(--green-soft) !important; color: var(--green) !important; }
.ic-navy { background: #e7ecfa !important; color: var(--navy) !important; }
.ic-red { background: var(--red-soft) !important; color: var(--red) !important; }
.card h3 { margin: 0 0 7px; font-size: 16px; font-weight: 700; }
.card p { margin: 0; font-size: 14px; color: var(--text-2); }

/* ===== Тёмная секция с превью ===== */
.section-dark {
  background: var(--rail);
  color: #fff;
  border-top: 1px solid var(--rail-line);
  border-bottom: 1px solid var(--rail-line);
}
.section-dark .sec-sub { color: var(--rail-muted); }

.tabs {
  display: inline-flex; gap: 3px; margin-bottom: 18px;
  padding: 3px; border-radius: var(--r-md);
  background: var(--rail-2); border: 1px solid var(--rail-line);
}
.tab {
  height: 30px; padding: 0 14px;
  border: 0; border-radius: var(--r-sm);
  background: none; color: var(--rail-text);
  font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background 0.14s, color 0.14s;
}
.tab:hover { color: #fff; }
.tab.on { background: var(--primary); color: #fff; }

.panes {
  background: var(--bg);
  border: 1px solid var(--rail-line);
  border-radius: var(--r-xl);
  padding: 14px;
  box-shadow: var(--shadow-lg);
  color: var(--text);
}
.pane { display: none; }
.pane.on { display: block; animation: fade 0.24s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.p-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  padding: 4px 6px 12px;
}
.p-title { font-size: 15px; font-weight: 700; }
.p-stats { margin-left: auto; font-size: 12px; color: var(--text-muted); }
.p-stats b { color: var(--text); font-variant-numeric: tabular-nums; }
.p-stats b.hot { color: var(--red); }
.p-stats b.good { color: var(--green); }
.p-rows { display: grid; gap: 7px; }
.p-row {
  display: grid; grid-template-columns: 4px 34px minmax(0, 1fr) 96px auto auto;
  align-items: center; gap: 10px;
  height: 44px; padding-right: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color 0.14s, transform 0.14s;
}
.p-row:hover { border-color: var(--primary); transform: translateX(2px); }
.p-row .m-id { font-size: 11px; }
.p-row .m-tx { font-size: 13px; }
.p-row .m-st,
.p-row .m-sla { font-size: 11px; }
.m-org { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Карточка заявки */
.c-grid { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 14px; }
.c-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; }
.c-title .cdot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); flex: none; }
.c-title b { color: var(--text-muted); font-weight: 700; }
.c-meta { font-size: 11.5px; color: var(--text-muted); margin: 5px 0 12px 16px; }
.c-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 12px 14px; font-size: 13px; margin-bottom: 12px;
}
.c-cmt {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 10px 12px; font-size: 12.5px; margin-bottom: 8px;
}
.c-cmt.int { background: var(--amber-soft); border-color: #f2e2c9; }
.c-cmt-h { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; font-size: 12px; }
.c-time { margin-left: auto; font-size: 10.5px; color: var(--text-muted); }
.av {
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 8.5px; font-weight: 700; color: #fff; flex: none;
}
.av.eng { background: var(--navy); }
.c-side { display: grid; gap: 10px; align-content: start; }
.c-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 11px 12px; }
.c-h {
  font-size: 9px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 8px;
}
.kv {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 4px 0; font-size: 11.5px; border-bottom: 1px solid var(--divider);
}
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--text-muted); }
.kv b.warn { color: var(--amber); }
.f-lab { font-size: 10.5px; font-weight: 600; color: var(--text-2); margin: 6px 0 3px; }
.f-sel {
  border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  padding: 5px 8px; font-size: 11.5px; background: var(--surface-2);
}

/* Аналитика */
.s-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 12px; }
.s-tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 12px 14px; display: grid; gap: 2px;
}
.s-tile .v { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.s-tile .v.hot { color: var(--red); }
.s-tile .v.good { color: var(--green); }
.s-tile .k { font-size: 11px; color: var(--text-muted); }
.s-chart {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 12px; margin-bottom: 12px;
}
.s-chart svg { width: 100%; height: 150px; display: block; }
.s-chart .g { stroke: var(--divider); stroke-width: 1; }
.s-chart .ln { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.s-chart .ln.created { stroke: var(--primary); }
.s-chart .ln.resolved { stroke: var(--green); }
.s-leg { display: flex; gap: 16px; margin-top: 8px; font-size: 11px; color: var(--text-muted); }
.s-leg i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.s-leg .d.created { background: var(--primary); }
.s-leg .d.resolved { background: var(--green); }
.s-rows { display: grid; gap: 7px; }
.s-row {
  display: flex; justify-content: space-between; gap: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 9px 12px; font-size: 12.5px;
}
.s-row .mut { color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* ===== Форма ===== */
.form { display: flex; flex-direction: column; gap: 14px; }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; }
.form label > span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.form input,
.form textarea {
  width: 100%; padding: 11px 13px;
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  background: var(--surface);
  font-family: inherit; font-size: 14px; color: var(--text);
  resize: vertical;
  transition: border-color 0.14s, box-shadow 0.14s;
}
.form input::placeholder,
.form textarea::placeholder { color: var(--text-faint); }
.form input:focus,
.form textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring);
}
.form .btn { align-self: flex-start; }
.form button[disabled] { opacity: 0.6; cursor: default; transform: none; }

/* Ловушка для ботов: убрана с глаз, но остаётся в форме.
   display:none некоторые боты пропускают, поэтому прячем позицией. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-note { margin: 2px 0 0; font-size: 13px; min-height: 20px; }
.form-note.ok { color: var(--green); }
.form-note.err { color: var(--red); }

/* ===== Подвал ===== */
.footer { background: var(--rail); border-top: 1px solid var(--rail-line); padding: 28px 0; }
.footer-in { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer .logo-ops { color: #e6e9ee; }
.footer .logo-key { color: #93adf0; }
.footer .muted { color: var(--rail-muted); font-size: 13px; text-decoration: none; }
.footer a.muted:hover { color: #fff; }
.footer-in .muted:nth-of-type(1) { margin-right: auto; }

/* ===== Появление при прокрутке =====
   Контент виден ПО УМОЛЧАНИЮ. Прятать его берётся только скрипт — и
   только после того, как убедится, что умеет показать обратно (класс
   js-anim ставится в main.js). Иначе любая осечка JS — блокировщик,
   оборванная загрузка, чужой движок — оставила бы витрину продукта
   пустым экраном. */
.js-anim .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.js-anim .reveal.in { opacity: 1; transform: none; }

/* Уважаем системную настройку «меньше движения»: анимации выключаются,
   но контент остаётся видимым. */
@media (prefers-reduced-motion: reduce) {
  .js-anim .reveal { opacity: 1; transform: none; transition: none; }
  .shot { transform: none; transition: none; }
  .pulse { animation: none; }
  * { scroll-behavior: auto !important; }
}

html { scroll-behavior: smooth; }

/* ===== Узкие экраны ===== */
@media (max-width: 940px) {
  .hero-in { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .shot { transform: none; }
  .hero h1 { font-size: 38px; }
  .c-grid { grid-template-columns: minmax(0, 1fr); }
  .p-row { grid-template-columns: 4px 30px minmax(0, 1fr) auto; }
  .p-row .m-org, .p-row .m-st { display: none; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero { padding: 48px 0 56px; }
  .hero h1 { font-size: 31px; }
  .section { padding: 56px 0; }
  .sec-head h2 { font-size: 24px; }
  .f-row { grid-template-columns: minmax(0, 1fr); }
  .shot-app { grid-template-columns: 108px minmax(0, 1fr); }
  .m-row { grid-template-columns: 3px 22px minmax(0, 1fr) auto; }
  .m-row .m-st { display: none; }
}
