/* ================================================================
   UX Radar — Shared Design System  ·  "Signal Spectrum"
   ================================================================ */

:root {
  /* Surfaces */
  --bg:        #F5F6F7;
  --surface:   #FFFFFF;
  --surface-2: #EEEFF1;
  --line:      #E4E5E8;
  --line-2:    #D2D4D9;

  /* Ink */
  --ink:       #111318;
  --ink-2:     #42454E;
  --ink-3:     #73767F;
  --ink-4:     #A8ABB4;

  /* Single anchor accent — blue from the spectrum's edge (logo #0457D9) */
  --accent:    #0A53D8;
  --accent-h:  #0840AE;
  --accent-soft:#E7EEFC;
  --accent-ink:#FFFFFF;

  /* Spectrum (raw, from the logo gradient) — used ONLY as thin signal strips */
  --spec-red:   #FF2400;
  --spec-yellow:#F9E002;
  --spec-lime:  #C6E90E;
  --spec-green: #45FD2B;
  --spec-blue:  #0457D9;
  --signal: linear-gradient(90deg,
              var(--spec-red) 0%, #FF7A00 14%, var(--spec-yellow) 30%,
              var(--spec-lime) 45%, var(--spec-green) 64%, #16B6C9 82%, var(--spec-blue) 100%);

  /* Priority colors — refined for legibility on light surfaces */
  --p1: #D8372A;   /* critical  */
  --p2: #BE7A05;   /* medium    */
  --p3: #1E8A4E;   /* low/ok    */

  /* Type */
  --font-sans: "Golos Text", "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Geometry */
  --r-sm: 5px;
  --r:    9px;
  --r-lg: 16px;

  /* Layout */
  --container: 1280px;
  --gutter: 28px;
}


* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 { letter-spacing: -0.02em; font-weight: 600; text-wrap: balance; margin: 0; }

::selection { background: #14130E; color: #fff; }

/* ------------------ Layout ------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container-narrow {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ------------------ Signal strip (spectrum signature) ------------------ */
.signal-strip {
  height: 4px;
  width: 100%;
  background: var(--signal);
  border-radius: 999px;
}
.signal-edge { height: 3px; background: var(--signal); }

/* ------------------ Top Bar ------------------ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); }
.brand-logo { height: 30px; width: auto; display: block; }
.brand-mark { width: 26px; height: 26px; display: inline-block; }
.brand-name { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.brand-status {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--line-2);
  padding: 3px 8px;
  border-radius: 999px;
}

.nav { display: flex; align-items: center; gap: 30px; }
.nav a {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 120ms;
  white-space: nowrap;
}
.nav a:hover { color: var(--ink); }
.nav a.btn-primary { color: #fff; }
.nav a.btn-primary:hover { color: #fff; }

.nav-tools { display: flex; align-items: center; gap: 14px; }

@media (max-width: 1000px) { .nav .nav-link { display: none; } .nav .nav-cta-desktop { display: none; } }

/* ------------------ Mobile nav ------------------ */
.nav-mobile-btn { display: none; width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); align-items: center; justify-content: center; cursor: pointer; }
.nav-mobile-btn svg { width: 20px; height: 20px; color: var(--ink); }
.nav-mobile-panel { display: none; border-top: 1px solid var(--line); background: var(--bg); }
.nav-mobile-panel.is-open { display: block; }
.nav-mobile-list { display: flex; flex-direction: column; padding-top: 8px; padding-bottom: 16px; }
.nav-mobile-list a { font-size: 17px; font-weight: 500; color: var(--ink-2); text-decoration: none; padding: 14px 2px; border-bottom: 1px solid var(--line); }
.nav-mobile-list a:last-child { border-bottom: 0; }
.nav-mobile-list a:hover { color: var(--ink); }
@media (max-width: 1000px) { .nav-mobile-btn { display: inline-flex; } }
@media (min-width: 1001px) { .nav-mobile-btn, .nav-mobile-panel, .nav-mobile-panel.is-open { display: none; } }

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 3px;
}
.theme-toggle button {
  width: 30px; height: 28px;
  border: 0; background: transparent;
  border-radius: 999px;
  display: grid; place-items: center;
  color: var(--ink-3);
  transition: background 140ms, color 140ms;
}
.theme-toggle button svg { width: 15px; height: 15px; }
.theme-toggle button.is-active { background: var(--ink); color: #fff; }

/* ------------------ Buttons ------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 48px;
  padding: 0 22px;
  border-radius: var(--r);
  border: 1px solid transparent;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  background: transparent;
  color: var(--ink);
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
  white-space: nowrap;
  position: relative;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: var(--accent-h); }
.btn-ghost { background: transparent; border: 1px solid var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; }
.btn-lg { height: 56px; padding: 0 26px; font-size: 17px; }
.btn-block { width: 100%; }
.btn .arrow { display: inline-block; transition: transform 160ms ease; }
.btn:hover .arrow { transform: translateX(4px); }

/* ------------------ Section primitives ------------------ */
.section { padding: 104px 0; border-top: 1px solid var(--line); }
.section-tight { padding: 76px 0; }
@media (max-width: 880px) {
  .section { padding: 52px 0; }
  .section-tight { padding: 40px 0; }
}

.section-head {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  margin-bottom: 56px;
  align-items: end;
}
@media (max-width: 880px) { .section-head { grid-template-columns: 1fr; gap: 18px; margin-bottom: 44px; } }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 3px;
  background: var(--signal);
  border-radius: 999px;
  display: inline-block;
}

.section-title {
  font-size: clamp(30px, 3.8vw, 48px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 18px 0 0 0;
  max-width: 18ch;
  text-wrap: balance;
}
.section-lede {
  font-size: 18px;
  color: var(--ink-2);
  max-width: 52ch;
  line-height: 1.6;
  margin: 0;
  text-wrap: pretty;
}

/* Ruler / measurement divider */
.ruler {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 52px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink-3);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.ruler::after {
  content: "";
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--line-2) 0 1px, transparent 1px 9px);
}
.ruler .ruler-line { display: none; }

/* ------------------ Card ------------------ */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 30px;
}

/* ------------------ Footer ------------------ */
.footer { border-top: 1px solid var(--line); padding: 64px 0 44px; margin-top: 0; }
.footer-row { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; }
@media (max-width: 760px) { .footer-row { grid-template-columns: 1fr 1fr; } }
.footer h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin: 0 0 16px 0;
  font-weight: 500;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.footer a { font-size: 15px; color: var(--ink-2); }
.footer a:hover { color: var(--ink); }
.footer-meta {
  margin-top: 52px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ------------------ Form primitives ------------------ */
.label { display: block; font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.helper { font-size: 14px; color: var(--ink-3); margin-top: 7px; line-height: 1.55; }
.input, .textarea, .select {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: 13px 15px;
  line-height: 1.45;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.input.is-invalid, .textarea.is-invalid {
  border-color: var(--p1);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--p1) 12%, transparent);
}
.input.is-valid { border-color: var(--p3); }
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.textarea { min-height: 130px; resize: vertical; }
.error-msg { font-size: 14px; color: var(--p1); margin-top: 7px; }

/* Поле со статичным префиксом (@username) */
.input-prefixed { display: flex; align-items: center; gap: 2px; padding-right: 0; }
.input-prefixed:focus-within { border-color: var(--accent); outline: none; }
.input-prefix { color: var(--ink-4); flex: none; user-select: none; }
.input-bare {
  flex: 1; min-width: 0;
  border: 0; outline: none; background: transparent; padding: 0;
  font: inherit; color: inherit;
}
.input-bare::placeholder { color: var(--ink-4); }

.submit-error {
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid var(--p1);
  border-radius: var(--r);
  background: #FDF2F1;
  color: var(--ink);
  font-size: 15px;
}
.submit-error p { margin: 0; }
.submit-error p + p { margin-top: 8px; color: var(--ink-2); font-size: 14px; }
.submit-error a { color: var(--accent); border-bottom: 1px solid var(--line-2); }

/* Chip */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 30px; padding: 0 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink-2);
}
.chip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; }

.kbd {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 7px;
  color: var(--ink-2);
}

.dot-grid-bg { background-image: radial-gradient(rgba(20,19,14,0.10) 1px, transparent 1px); background-size: 16px 16px; }

/* Priority badge */
.pri {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  color: var(--ink-3);
  white-space: nowrap;
}
.pri.p1 { color: var(--p1); border-color: color-mix(in srgb, var(--p1) 35%, transparent); background: color-mix(in srgb, var(--p1) 7%, transparent); }
.pri.p2 { color: var(--p2); border-color: color-mix(in srgb, var(--p2) 35%, transparent); background: color-mix(in srgb, var(--p2) 7%, transparent); }
.pri.p3 { color: var(--p3); border-color: color-mix(in srgb, var(--p3) 35%, transparent); background: color-mix(in srgb, var(--p3) 7%, transparent); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
