/* ============ WPS.guru — Variant D «Skyline» ============
   Современный премиальный SaaS (Stripe/Linear-класс): белый,
   индиго-градиент, KPI-карточки, слоистые тени.
   Figtree (display+body) / Fira Code (data) */

:root {
  --bg: #f8f9fb;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-soft: #eef2f6;
  --indigo: #4f46e5;
  --violet: #7c3aed;
  --indigo-dark: #4338ca;
  --indigo-wash: #eef2ff;
  --ok: #059669;
  --ok-wash: #ecfdf5;
  --bad: #dc2626;
  --bad-wash: #fef2f2;
  --grad: linear-gradient(135deg, #4f46e5, #7c3aed);
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06);
  --shadow-md: 0 1px 2px rgba(15,23,42,.05), 0 8px 24px rgba(15,23,42,.08);
  --shadow-lg: 0 2px 4px rgba(15,23,42,.05), 0 20px 48px rgba(15,23,42,.12);
  --mono: "Fira Code", ui-monospace, monospace;
  --sans: "Figtree", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); line-height: 1.55; }
a { color: var(--indigo); }
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; }

/* ---------- top nav ---------- */
.topbar {
  display: flex; align-items: center; gap: 2rem;
  background: var(--card); border-bottom: 1px solid var(--line);
  padding: .8rem 2rem; position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--text); font-weight: 800; font-size: 1.12rem; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 9px; background: var(--grad);
  display: grid; place-items: center; color: #fff; font-size: .95rem; font-weight: 800;
}
.topnav { display: flex; gap: 1.5rem; margin-left: auto; align-items: center; }
.topnav > a { color: var(--muted); text-decoration: none; font-size: .93rem; font-weight: 500; }
.topnav > a:hover { color: var(--text); }
.topnav > a.active { color: var(--text); font-weight: 700; }
.topnav .user { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .85rem; border-left: 1px solid var(--line); padding-left: 1.4rem; }
.avatar {
  width: 30px; height: 30px; border-radius: 999px; background: var(--indigo-wash); color: var(--indigo-dark);
  display: grid; place-items: center; font-size: .78rem; font-weight: 700;
}

.wrap { max-width: 1200px; margin: 0 auto; padding: 2rem 2rem 6rem; }
.wrap-narrow { max-width: 430px; margin: 0 auto; padding: 3rem 1.5rem 6rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--sans); font-size: .92rem; font-weight: 700;
  border-radius: 10px; padding: .6rem 1.2rem; cursor: pointer;
  border: 1px solid transparent; text-decoration: none;
}
.btn-grad { background: var(--grad); color: #fff; box-shadow: 0 1px 2px rgba(79,70,229,.4), 0 6px 16px rgba(79,70,229,.25); }
.btn-grad:hover { filter: brightness(1.07); }
.btn-white { background: var(--card); color: var(--text); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-white:hover { border-color: #cbd5e1; }
.btn-soft { background: var(--indigo-wash); color: var(--indigo-dark); }
.btn-soft:hover { background: #e0e7ff; }
.btn-link { background: none; border: none; color: var(--indigo); cursor: pointer; font-size: .9rem; font-weight: 600; padding: .6rem .3rem; text-decoration: none; }
.btn-link:hover { text-decoration: underline; }
.topnav a.btn-grad, .mkt-nav a.btn-grad { color: #fff; }

/* ---------- page head ---------- */
.page-head { display: flex; align-items: center; gap: 1rem; margin: .4rem 0 1.4rem; flex-wrap: wrap; }
.page-head h1 { font-weight: 800; font-size: 1.65rem; margin: 0; letter-spacing: -.02em; }
.page-head .sub { color: var(--muted); font-size: .9rem; }
.page-head .actions { margin-left: auto; display: flex; gap: .7rem; align-items: center; }
.crumb { font-size: .83rem; color: var(--muted); margin-bottom: .15rem; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--indigo); }

/* ---------- KPI row (signature) ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.3rem; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.2rem; box-shadow: var(--shadow-sm); }
.kpi .k-label { font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.kpi .k-value { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; margin-top: .15rem; }
.kpi .k-value.mono { font-family: var(--mono); font-size: 1.25rem; font-weight: 600; }
.kpi .k-note { font-size: .78rem; color: var(--muted); margin-top: .1rem; }
.kpi.alert { border-color: #fecaca; background: var(--bad-wash); }
.kpi.alert .k-value { color: var(--bad); }

/* ---------- cards & tables ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); overflow: hidden; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); text-align: left; padding: .75rem 1.1rem;
  border-bottom: 1px solid var(--line); background: #fbfcfe;
}
.tbl td { padding: .78rem 1.1rem; border-bottom: 1px solid var(--line-soft); font-size: .92rem; vertical-align: middle; }
.tbl tbody tr:hover td { background: #f8faff; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl .num, .tbl th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: .87rem; }
.tbl .mono { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.tbl tfoot td { border-top: 1px solid var(--line); background: #fbfcfe; font-weight: 700; }
.rowlink { color: var(--text); text-decoration: none; font-weight: 600; }
.rowlink:hover { color: var(--indigo); }
.cell-actions a { font-size: .85rem; margin-right: .7rem; font-weight: 600; text-decoration: none; }
.cell-actions a:hover { text-decoration: underline; }

.pill { display: inline-flex; align-items: center; gap: .32rem; font-size: .76rem; font-weight: 700; border-radius: 999px; padding: .2rem .6rem; }
.pill-ok { background: var(--ok-wash); color: var(--ok); }
.pill-bad { background: var(--bad-wash); color: var(--bad); }
.pill-ind { background: var(--indigo-wash); color: var(--indigo-dark); }

.co-avatar {
  width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center;
  font-weight: 800; font-size: .82rem; margin-right: .7rem; vertical-align: middle;
}

/* ---------- toolbar ---------- */
.toolbar { display: flex; align-items: flex-end; gap: 1.2rem; flex-wrap: wrap; padding: 1rem 1.2rem; background: var(--card); border-bottom: 1px solid var(--line); }
.tb-group { display: flex; flex-direction: column; gap: .3rem; }
.tb-label { font-size: .7rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.toolbar select, .toolbar input {
  font-family: var(--sans); font-size: .9rem; padding: .5rem .65rem; color: var(--text);
  border: 1px solid var(--line); border-radius: 9px; background: #fff;
}
.toolbar .spacer { flex: 1; }

/* ---------- forms ---------- */
.form-card { padding: 1.8rem 2rem; }
.form-card h2 { font-size: 1.25rem; font-weight: 800; margin: 0 0 1.3rem; letter-spacing: -.01em; }
.field { margin-bottom: 1.15rem; }
.field label { display: block; font-size: .84rem; font-weight: 700; margin-bottom: .35rem; }
.field input, .field select {
  width: 100%; font-family: var(--sans); font-size: .94rem; color: var(--text);
  padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  box-shadow: var(--shadow-sm);
}
.field input.data { font-family: var(--mono); font-size: .88rem; letter-spacing: .02em; }
.field input:focus { border-color: var(--indigo); outline: none; box-shadow: 0 0 0 3px var(--indigo-wash); }
.field .help { font-size: .8rem; color: var(--muted); margin-top: .32rem; }
.field .help.ok { color: var(--ok); font-weight: 600; }
.field .error { font-size: .8rem; color: var(--bad); margin-top: .32rem; font-weight: 700; }
.field input.invalid { border-color: var(--bad); }
.field-row { display: flex; gap: 1rem; }
.field-row .field { flex: 1; }
.form-actions { display: flex; gap: .7rem; margin-top: 1.5rem; align-items: center; }
.input-btn { display: flex; gap: .5rem; }
.input-btn input { flex: 1; }

/* ---------- modal ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.5); backdrop-filter: blur(4px); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 1rem; overflow: auto; z-index: 50; }
.modal { background: var(--card); width: 520px; max-width: 100%; border-radius: 16px; box-shadow: var(--shadow-lg); }

/* ---------- onboarding ---------- */
.onboard { max-width: 640px; margin: 3rem auto; }
.onboard .card { padding: 2.6rem 3rem; }
.onboard h1 { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; margin: 0 0 .4rem; }
.onboard .lede { color: var(--muted); margin: 0 0 1.6rem; }
.progress { height: 8px; border-radius: 99px; background: var(--line-soft); margin-bottom: 1.8rem; overflow: hidden; }
.progress i { display: block; height: 100%; width: 8%; background: var(--grad); border-radius: 99px; }
.steplist { display: flex; flex-direction: column; gap: .8rem; margin-bottom: 2rem; }
.steplist .st { display: flex; gap: 1rem; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.2rem; }
.steplist .st.now { border-color: var(--indigo); background: var(--indigo-wash); }
.steplist .n {
  width: 30px; height: 30px; flex: none; border-radius: 999px; display: grid; place-items: center;
  background: var(--indigo-wash); color: var(--indigo-dark); font-weight: 800; font-size: .85rem;
}
.steplist .st.now .n { background: var(--grad); color: #fff; }
.steplist b { display: block; }
.steplist span { color: var(--muted); font-size: .87rem; }

/* ---------- landing ---------- */
.mkt-nav { display: flex; align-items: center; gap: 2rem; max-width: 1200px; margin: 0 auto; padding: 1rem 2rem; }
.mkt-nav nav { margin-left: auto; display: flex; gap: 1.2rem; align-items: center; }
.mkt-nav nav > a { color: var(--text); text-decoration: none; font-size: .93rem; font-weight: 600; }
.hero {
  text-align: center; padding: 5rem 1.5rem 3rem; position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; top: -220px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 500px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(99,102,241,.18), rgba(124,58,237,.08), transparent);
  pointer-events: none;
}
.hero .eyebrow {
  display: inline-block; background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: .3rem .9rem; font-size: .8rem; font-weight: 600; color: var(--muted); box-shadow: var(--shadow-sm);
}
.hero .eyebrow b { color: var(--indigo); }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 3.9rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.04; margin: 1.1rem auto .9rem; max-width: 15em; }
.hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); font-size: 1.13rem; max-width: 36em; margin: 0 auto 2rem; }
.hero .cta { display: flex; gap: .9rem; justify-content: center; }
.shot { max-width: 1080px; margin: 2.5rem auto 0; padding: 0 1.5rem; position: relative; }
.shot .card { box-shadow: var(--shadow-lg); }
.feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; max-width: 1080px; margin: 3.5rem auto 0; padding: 0 1.5rem; }
.feat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1.5rem 1.6rem; box-shadow: var(--shadow-sm); }
.feat .fi { width: 34px; height: 34px; border-radius: 10px; background: var(--indigo-wash); color: var(--indigo-dark); display: grid; place-items: center; font-weight: 800; margin-bottom: .8rem; }
.feat h3 { margin: 0 0 .35rem; font-size: 1.02rem; font-weight: 700; }
.feat p { margin: 0; color: var(--muted); font-size: .9rem; }

footer.site { border-top: 1px solid var(--line); margin-top: 5rem; padding: 1.6rem; text-align: center; color: var(--muted); font-size: .82rem; background: var(--card); }

/* ---------- OTP ---------- */
.otp-row { display: flex; gap: .5rem; justify-content: center; margin: 1.2rem 0; }
.otp-row input {
  width: 3rem; height: 3.5rem; text-align: center; font-family: var(--mono); font-size: 1.25rem;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow-sm);
}
.hint-box { background: var(--indigo-wash); padding: .85rem 1rem; font-size: .87rem; color: var(--indigo-dark); border-radius: 10px; }

/* ---------- variant switcher ---------- */
.ds-switch {
  position: fixed; bottom: 14px; right: 14px; z-index: 99;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: .35rem .8rem; font-size: .78rem; box-shadow: var(--shadow-md); color: var(--muted);
}
.ds-switch a { margin: 0 .3rem; text-decoration: none; color: var(--muted); font-weight: 700; }
.ds-switch a.cur { color: var(--indigo); text-decoration: underline; }

@media (max-width: 900px) {
  .topnav, .mkt-nav nav { display: none; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .feats { grid-template-columns: 1fr; }
  .field-row { flex-direction: column; gap: 0; }
}
