@font-face {
  font-family: "Commissioner";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("https://bglab.store/fonts/commissioner-700.ttf") format("truetype");
}

@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("https://bglab.store/fonts/golos-text-400.ttf") format("truetype");
}

@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url("https://bglab.store/fonts/golos-text-600.ttf") format("truetype");
}

:root {
  --text: #08182b;
  --text-soft: #56677d;
  --muted: #6b7b8f;
  --primary: #527df2;
  --primary-dark: #416ce3;
  --primary-soft: #e8efff;
  --surface: #f5f8fc;
  --surface-strong: #eaf1fc;
  --border: #dce5f0;
  --dark: #08182b;
  --dark-soft: #a9b8ca;
  --error: #a51f1f;
  --success: #17663b;
  --container: 1180px;
  --header-height: 78px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 94px;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background: var(--surface);
  font-family: "Golos Text", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
  height: auto;
}

button,
a,
select,
.consent {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

:focus-visible {
  outline: 3px solid #9db7ff;
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.container {
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff;
  color: var(--dark);
  font-weight: 600;
}

.skip-link:focus {
  transform: translateY(0);
}

.metrika-pixel {
  position: absolute;
  left: -9999px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 24, 43, 0.97);
  color: #fff;
  backdrop-filter: blur(14px);
}

.header-inner {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 30px;
}

.brand {
  display: inline-flex;
  align-items: center;
  width: 142px;
}

.brand img,
.site-footer img {
  width: 142px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
  color: #d4deeb;
  font-size: 14px;
  font-weight: 600;
}

.desktop-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.desktop-nav a:hover {
  color: #fff;
}

.header-phone {
  min-height: 48px;
  display: grid;
  align-content: center;
  padding-left: 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  text-align: right;
}

.header-phone span {
  font-family: "Commissioner", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.2;
}

.header-phone small {
  margin-top: 3px;
  color: #9fb0c4;
  font-size: 11px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 76px 0 70px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle at 78% 16%, rgba(82, 125, 242, 0.22), transparent 28%),
    linear-gradient(145deg, #eef4ff 0%, #f7f9fc 54%, #edf3fb 100%);
}

.hero::before {
  content: "";
  position: absolute;
  width: 460px;
  height: 460px;
  top: -230px;
  right: -170px;
  border: 1px solid rgba(82, 125, 242, 0.14);
  border-radius: 50%;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 68px;
  align-items: center;
}

.section-kicker {
  margin: 0 0 14px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: "Commissioner", Arial, sans-serif;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 5.2vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.hero-lead {
  max-width: 690px;
  margin: 24px 0 0;
  color: #506178;
  font-size: 19px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 34px;
}

.hero-actions > span {
  color: #68798e;
  font-size: 14px;
}

.button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 600;
}

.button svg,
.start-links svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 26px rgba(48, 88, 190, 0.22);
  transition: background 180ms ease, transform 180ms ease;
}

.button-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.button-primary:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

.start-panel {
  padding: 30px;
  border-radius: 26px;
  background: var(--dark);
  color: #fff;
  box-shadow: 0 28px 70px rgba(8, 24, 43, 0.2);
}

.start-panel > p {
  margin: 0 0 6px;
  color: #91acf9;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.start-panel h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1.25;
}

.start-links {
  display: grid;
  margin-top: 22px;
}

.start-links a {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  transition: color 160ms ease, padding 160ms ease;
}

.start-links a:hover {
  padding-left: 4px;
  color: #a9bfff;
}

.start-links small {
  display: block;
  color: #8fa0b5;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.start-links strong {
  display: block;
  margin-top: 3px;
  font-size: 15px;
  line-height: 1.35;
}

.articles-section {
  padding: 88px 0 104px;
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 0.62fr);
  gap: 64px;
  align-items: end;
}

.section-heading h2,
.how-heading h2,
.request-copy h2 {
  margin: 0;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-heading > p {
  margin: 0 0 4px;
  color: var(--text-soft);
  font-size: 17px;
}

.article-toolbar {
  position: sticky;
  top: 92px;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(270px, 0.8fr) minmax(0, 1.7fr);
  gap: 14px;
  margin-top: 40px;
  padding: 14px;
  border: 1px solid rgba(208, 220, 234, 0.92);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 14px 44px rgba(39, 61, 88, 0.09);
  backdrop-filter: blur(14px);
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.search-field > svg {
  position: absolute;
  z-index: 1;
  left: 15px;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #718198;
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}

.search-field input {
  width: 100%;
  min-height: 48px;
  padding: 0 44px;
  border: 1px solid #aebed1;
  border-radius: 13px;
  background: #f6f8fb;
  color: var(--text);
}

.search-field input::placeholder {
  color: #5f6f82;
  opacity: 1;
}

#clear-search {
  position: absolute;
  right: 2px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #607087;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

#clear-search:hover {
  background: #e8eef7;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.filter-button {
  min-height: 44px;
  flex: 0 0 auto;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #53647a;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.filter-button:hover {
  background: #f0f4fa;
  color: #17345c;
}

.filter-button.is-active {
  border-color: #c7d6ff;
  background: var(--primary-soft);
  color: #2854c7;
}

.results-count {
  margin: 20px 0 12px;
  color: #68798e;
  font-size: 14px;
  font-weight: 600;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.article-card {
  min-height: 292px;
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 30px rgba(39, 61, 88, 0.05);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.article-card:hover {
  transform: translateY(-3px);
  border-color: #b7c9f6;
  box-shadow: 0 18px 44px rgba(39, 61, 88, 0.1);
}

.article-card-top,
.article-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.article-card-top > span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #edf3ff;
  color: #17345c;
  font-size: 12px;
  font-weight: 600;
}

.article-card-top small {
  color: #8998aa;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.article-card h3 {
  margin: 27px 0 10px;
  font-size: 25px;
  line-height: 1.22;
  letter-spacing: -0.028em;
}

.article-card > p {
  margin: 0;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.6;
}

.article-card-footer {
  margin-top: auto;
  padding-top: 24px;
}

.article-card-footer > span {
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.article-card-footer a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #17345c;
  font-size: 14px;
  font-weight: 600;
}

.article-card-footer a:hover {
  color: var(--primary-dark);
}

.empty-state {
  padding: 70px 24px;
  border: 1px dashed #c8d4e2;
  border-radius: 22px;
  background: #fff;
  text-align: center;
}

.empty-state h3 {
  margin: 0;
  font-size: 25px;
}

.empty-state p {
  margin: 8px 0 20px;
  color: var(--text-soft);
  font-size: 16px;
}

.empty-state button {
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 13px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}

.how-to-use {
  padding: 90px 0;
  background:
    radial-gradient(circle at 85% 0%, rgba(82, 125, 242, 0.24), transparent 30%),
    var(--dark);
  color: #fff;
}

.how-heading {
  max-width: 760px;
}

.how-heading > p {
  max-width: 640px;
  margin: 20px 0 0;
  color: var(--dark-soft);
  font-size: 17px;
}

.how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}

.how-steps li {
  min-height: 220px;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.055);
}

.how-steps span {
  color: #8292a8;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.how-steps h3 {
  margin: 50px 0 8px;
  font-size: 20px;
  line-height: 1.3;
}

.how-steps p {
  margin: 0;
  color: var(--dark-soft);
  font-size: 16px;
  line-height: 1.6;
}

.request-section {
  padding: 88px 0;
  background: var(--surface-strong);
}

.request-shell {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.72fr);
  gap: 70px;
  align-items: center;
  padding: 54px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 4% 0%, rgba(82, 125, 242, 0.3), transparent 32%),
    #0a1b31;
  color: #fff;
  box-shadow: 0 24px 70px rgba(8, 24, 43, 0.18);
}

.request-copy > p {
  max-width: 660px;
  margin: 22px 0 0;
  color: #b1bfd0;
  font-size: 17px;
  line-height: 1.65;
}

.request-copy ul {
  display: grid;
  gap: 13px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.request-copy li {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #e5edf7;
  font-size: 16px;
}

.request-copy li span {
  color: #7fa0ff;
  font-weight: 600;
}

.request-phone {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  margin-top: 26px;
  color: #a9bfff;
  font-weight: 600;
}

.lead-form {
  display: grid;
  gap: 14px;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 20px 55px rgba(2, 12, 25, 0.22);
}

.form-title {
  margin: 0;
  font-size: 26px;
  line-height: 1.25;
}

.form-intro {
  margin: 7px 0 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.55;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: #2b3f59;
  font-size: 13px;
  font-weight: 600;
}

.field input,
.field select {
  width: 100%;
  min-height: 52px;
  padding: 0 15px;
  border: 1px solid #aebed1;
  border-radius: 13px;
  background: #f8fafd;
  color: var(--text);
  font-size: 16px;
}

.field input::placeholder {
  color: #5f6f82;
  opacity: 1;
}

.field input[aria-invalid="true"] {
  border-color: #bd3232;
}

.field-error {
  min-height: 18px;
  color: var(--error);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.consent {
  min-height: 44px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-soft);
  cursor: pointer;
  font-size: 12px;
  line-height: 1.5;
}

.consent input {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  margin: 1px 0 0;
  accent-color: var(--primary);
}

.consent a {
  color: #2854c7;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.consent-error {
  margin-top: -10px;
}

.form-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

.form-footnote {
  margin: -2px 0 0;
  color: #718198;
  font-size: 12px;
  line-height: 1.45;
}

.form-status {
  display: none;
  margin: 0;
  padding: 11px 13px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.form-status.is-visible {
  display: block;
}

.form-status.is-success {
  background: #e9f8ef;
  color: var(--success);
}

.form-status.is-error {
  background: #fff1f0;
  color: var(--error);
}

.site-footer {
  padding: 28px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #061220;
  color: #8fa0b5;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.footer-inner > div {
  text-align: right;
}

.footer-inner a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: #becbd9;
  font-size: 13px;
}

.footer-inner p {
  margin: 3px 0 0;
  font-size: 12px;
}

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

  .header-phone {
    margin-left: auto;
  }

  .hero-grid,
  .request-shell {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .start-panel,
  .lead-form {
    max-width: 720px;
  }

  .section-heading,
  .article-toolbar {
    grid-template-columns: 1fr;
  }

  .section-heading {
    gap: 18px;
  }

  .how-steps {
    grid-template-columns: 1fr;
  }

  .how-steps li {
    min-height: 185px;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 28px, var(--container));
  }

  .header-inner {
    min-height: 70px;
  }

  .brand,
  .brand img,
  .site-footer img {
    width: 124px;
  }

  .header-phone {
    padding-left: 12px;
  }

  .header-phone span {
    font-size: 14px;
  }

  .header-phone small {
    display: none;
  }

  .hero {
    padding: 52px 0;
  }

  .hero h1 {
    font-size: clamp(38px, 12.5vw, 54px);
  }

  .hero-lead {
    font-size: 17px;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .start-panel {
    padding: 23px 20px;
    border-radius: 21px;
  }

  .articles-section {
    padding: 66px 0 80px;
  }

  .article-toolbar {
    position: static;
    padding: 10px;
    border-radius: 17px;
  }

  .articles-grid {
    grid-template-columns: 1fr;
  }

  .article-card {
    min-height: 280px;
    padding: 22px;
  }

  .article-card h3 {
    font-size: 23px;
  }

  .how-to-use {
    padding: 72px 0;
  }

  .request-section {
    padding: 62px 0;
  }

  .request-shell {
    width: min(100% - 20px, var(--container));
    padding: 34px 20px 20px;
    border-radius: 24px;
  }

  .request-copy > p {
    font-size: 16px;
  }

  .lead-form {
    padding: 22px;
    border-radius: 18px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-inner > div {
    text-align: left;
  }
}

@media (max-width: 420px) {
  .header-phone span {
    font-size: 13px;
  }

  .article-card-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .request-copy h2 {
    font-size: 34px;
  }
}

/* Unified production header: mirrors the main bglab.store navigation. */
.site-header {
  position: relative;
  z-index: 50;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(7, 21, 37, 0.94);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.site-header .header-inner {
  width: min(calc(100% - 64px), 1280px);
  min-height: 82px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 40px;
}

.site-header .brand {
  width: fit-content;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.site-header .brand-logo {
  width: 190px;
  height: 64px;
  display: block;
  object-fit: contain;
}

.site-header .header-nav {
  margin-left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 2vw, 30px);
  color: #c9d4e0;
  font-size: 0.88rem;
  font-weight: 500;
}

.site-header .header-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  transition: color 180ms ease;
}

.site-header .header-nav a:hover,
.site-header .header-phone:hover {
  color: #fff;
}

.site-header .header-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-header .header-phone {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding-left: 0;
  color: #fff;
  border-left: 0;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
}

.site-header .button.button-header {
  min-height: 44px;
  margin-top: 0;
  padding: 11px 17px;
  color: #071525;
  border-color: transparent;
  border-radius: 12px;
  background: #fff;
  font-family: "Golos Text", Arial, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
}

.site-header .button.button-header:hover {
  color: #071525;
  background: #eaf0ff;
  transform: none;
}

@media (max-width: 1200px) {
  .site-header .header-inner {
    gap: 24px;
  }

  .site-header .header-nav {
    gap: 16px;
    font-size: 0.875rem;
  }

  .site-header .header-phone {
    display: none;
  }
}

@media (max-width: 1020px) {
  .site-header .header-nav {
    display: none;
  }

  .site-header .header-actions {
    margin-left: auto;
  }

  .site-header .header-phone {
    display: inline-flex;
  }
}

@media (max-width: 680px) {
  .site-header .header-inner {
    width: min(calc(100% - 40px), 1280px);
    min-height: 68px;
    grid-template-columns: 1fr auto;
    gap: 14px;
  }

  .site-header .brand-logo {
    width: 156px;
    height: 42px;
  }

  .site-header .button.button-header {
    display: none;
  }

  .site-header .header-phone {
    min-height: 44px;
    font-size: 0.875rem;
  }
}

@media (max-width: 390px) {
  .site-header .header-inner {
    width: min(calc(100% - 32px), 1280px);
  }

  .site-header .header-phone {
    font-size: 0.8125rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
