/* ============================================================
   БогТех — shared styles
   Божественно-белая, воздушная, с линиями разметки и «+»
   ============================================================ */

:root {
  --bg:        #ffffff;
  --bg-soft:   #fafafb;
  --bg-tint:   #f6f7fb;
  --ink:       #0c0d10;
  --ink-2:     #43454d;
  --ink-3:     #80838c;
  --line:      #e7e8ec;
  --line-2:    #d8dade;
  --accent:    oklch(0.52 0.17 264);
  --accent-soft: oklch(0.52 0.17 264 / 0.08);
  --accent-ink: oklch(0.46 0.18 264);

  --frame-max: 1320px;
  --gutter: clamp(20px, 5vw, 64px);

  --ff-sans: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ff-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --r: 4px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--ff-sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html { overflow-x: hidden; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--accent-soft); color: var(--accent-ink); }

/* ---------- layout frame with ruled gutters ---------- */
.frame {
  position: relative;
  max-width: var(--frame-max);
  margin: 0 auto;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.band {
  position: relative;
  padding: clamp(56px, 8vw, 124px) var(--gutter);
}
.band + .band { border-top: 1px solid var(--line); }
.band.soft { background: var(--bg-soft); }
.band.tight { padding-top: clamp(40px, 5vw, 72px); padding-bottom: clamp(40px, 5vw, 72px); }

/* «+» corner markers (stamped by app.js) */
.plus {
  position: absolute;
  width: 13px; height: 13px;
  z-index: 4;
  pointer-events: none;
}
.plus::before, .plus::after {
  content: ""; position: absolute; background: var(--line-2);
}
.plus::before { left: 50%; top: 0; width: 1px; height: 100%; transform: translateX(-50%); }
.plus::after  { top: 50%; left: 0; height: 1px; width: 100%; transform: translateY(-50%); }
.plus.tl { left: 0;  top: 0;    transform: translate(-50%, -50%); }
.plus.tr { right: 0; top: 0;    transform: translate(50%, -50%); }
.plus.bl { left: 0;  bottom: 0; transform: translate(-50%, 50%); }
.plus.br { right: 0; bottom: 0; transform: translate(50%, 50%); }

/* eyebrow / mono labels */
.eyebrow {
  font-family: var(--ff-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow .idx { color: var(--accent-ink); }
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border: 1px solid var(--accent);
  display: inline-block;
  transform: rotate(45deg);
}

.mono { font-family: var(--ff-mono); }

/* ---------- typography ---------- */
h1, h2, h3 { font-weight: 600; letter-spacing: -0.025em; line-height: 1.04; text-wrap: balance; overflow-wrap: break-word; }
.display {
  font-size: clamp(2.7rem, 6.4vw, 5.3rem);
  font-weight: 600;
  letter-spacing: -0.038em;
  line-height: 0.98;
}
h2 { font-size: clamp(1.95rem, 4vw, 3.3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); letter-spacing: -0.02em; }

.lead {
  font-size: clamp(1.12rem, 1.5vw, 1.4rem);
  line-height: 1.5;
  color: var(--ink-2);
  font-weight: 400;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}
.muted { color: var(--ink-3); }
.measure { max-width: 62ch; }
.measure-sm { max-width: 46ch; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 500; letter-spacing: -0.01em;
  padding: 13px 22px;
  border-radius: var(--r);
  border: 1px solid transparent;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
  white-space: nowrap;
}
.btn .arw { transition: transform .2s ease; }
.btn:hover .arw { transform: translateX(3px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-lg { padding: 16px 26px; font-size: 16px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 500; font-size: 15px; color: var(--accent-ink);
}
.link-arrow .arw { transition: transform .2s ease; }
.link-arrow:hover .arw { transform: translateX(3px); }

/* ---------- top nav ---------- */
.nav-wrap { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav {
  max-width: var(--frame-max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter); height: 66px;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 600; letter-spacing: -0.03em; font-size: 19px; }
.brand .glyph {
  width: 26px; height: 26px; border-radius: 6px;
  background: var(--ink); color: #fff;
  display: grid; place-items: center;
  font-family: var(--ff-mono); font-size: 15px; font-weight: 500;
}
.brand .glyph span { transform: translateY(-0.5px); }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links > a { font-size: 15px; color: var(--ink-2); font-weight: 450; transition: color .15s; }
.nav-links > a:hover { color: var(--ink); }

/* dropdown */
.nav-item { position: relative; }
.nav-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; padding: 0;
  font-size: 15px; color: var(--ink-2); font-weight: 450; letter-spacing: -0.01em;
  transition: color .15s;
}
.nav-trigger:hover { color: var(--ink); }
.nav-trigger .caret { font-size: 9px; transition: transform .2s ease; color: var(--ink-3); }
.nav-item:hover .nav-trigger, .nav-item:focus-within .nav-trigger { color: var(--ink); }
.nav-item:hover .caret, .nav-item:focus-within .caret { transform: rotate(180deg); }
.dropdown {
  position: absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%) translateY(8px);
  width: 340px; background: #fff; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 18px 50px -12px rgba(20,20,50,.16);
  padding: 8px; opacity: 0; visibility: hidden; transition: opacity .18s ease, transform .18s ease;
  z-index: 60;
}
.nav-item:hover .dropdown, .nav-item:focus-within .dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.dropdown::before { content: ""; position: absolute; top: -10px; left: 0; right: 0; height: 10px; }
.drop-lead { display: block; padding: 14px 15px; border-radius: 6px; background: var(--bg-soft); border: 1px solid var(--line); transition: border-color .15s; }
.drop-lead:hover { border-color: var(--line-2); }
.drop-lead .drop-title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15.5px; letter-spacing: -0.02em; }
.drop-lead .drop-title::before { content: ""; width: 9px; height: 9px; background: var(--accent); transform: rotate(45deg); display: inline-block; }
.drop-lead .drop-sub { display: block; font-size: 13px; color: var(--ink-3); margin-top: 5px; line-height: 1.4; }
.drop-section { padding: 12px 7px 5px; }
.drop-label { font-family: var(--ff-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); padding: 0 8px 8px; }
.drop-section a { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 5px; font-size: 14.5px; color: var(--ink-2); transition: background .12s, color .12s; }
.drop-section a:hover { background: var(--bg-soft); color: var(--ink); }
.drop-section a .d { width: 7px; height: 7px; transform: rotate(45deg); flex: none; }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-2); border-radius: 4px; width: 40px; height: 38px; align-items: center; justify-content: center; }
.nav-toggle span { width: 16px; height: 1.5px; background: var(--ink); position: relative; display: block; }
.nav-toggle span::before, .nav-toggle span::after { content:""; position:absolute; left:0; width:16px; height:1.5px; background: var(--ink); }
.nav-toggle span::before { top: -5px; } .nav-toggle span::after { top: 5px; }

/* ---------- hero ---------- */
.hero { padding-top: clamp(64px, 9vw, 120px); padding-bottom: clamp(56px, 7vw, 104px); }
.hero-tag { margin-bottom: 30px; }
.hero h1 { margin-bottom: 28px; max-width: 22ch; }
.hero .lead { margin-bottom: 38px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.hero-meta {
  margin-top: clamp(48px, 6vw, 80px);
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
.hero-meta .cell { padding: 26px 26px 26px 0; position: relative; }
.hero-meta .cell + .cell { padding-left: 28px; border-left: 1px solid var(--line); }
.hero-meta .k { font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.hero-meta .v { font-size: clamp(1.5rem, 2.4vw, 2.1rem); font-weight: 600; letter-spacing: -0.03em; }

/* ---------- generic section head ---------- */
.head { display: grid; grid-template-columns: 1fr; gap: 22px; margin-bottom: clamp(40px, 5vw, 64px); }
.head .eyebrow { margin-bottom: 4px; }
.head .head-lead { max-width: 54ch; }
@media (min-width: 880px) {
  .head.split { grid-template-columns: 1.1fr 0.9fr; align-items: end; gap: 48px; }
  .head.split .head-lead { justify-self: end; }
}

/* ---------- platform feature grid ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.feat {
  position: relative;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 34px 30px 40px;
  background: var(--bg);
  transition: background .2s ease;
}
.feat:hover { background: var(--bg-soft); }
.feat .num { font-family: var(--ff-mono); font-size: 12px; color: var(--ink-3); letter-spacing: 0.1em; }
.feat h3 { margin: 16px 0 12px; hyphens: auto; }
.feat p { color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }

/* ---------- solution cards ---------- */
.sol-grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.sol {
  position: relative; display: flex; flex-direction: column;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 38px 36px 32px;
  min-height: 300px;
  background: var(--bg);
  transition: background .2s ease;
}
.sol:hover { background: var(--bg-soft); }
.sol .sol-no { font-family: var(--ff-mono); font-size: 12px; color: var(--ink-3); letter-spacing: 0.12em; }
.sol .mark { width: 34px; height: 34px; margin: 0 0 22px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 7px; }
.sol .mark i { width: 12px; height: 12px; display: block; }
.sol h3 { font-size: clamp(1.4rem, 2.1vw, 1.85rem); margin-bottom: 12px; }
.sol p { color: var(--ink-2); font-size: 15.5px; line-height: 1.55; max-width: 40ch; }
.sol .sol-foot { margin-top: auto; padding-top: 26px; display: flex; align-items: center; justify-content: space-between; }
.sol .tags { display: flex; gap: 7px; flex-wrap: wrap; }
.sol .tag { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--ink-3); border: 1px solid var(--line); border-radius: 100px; padding: 4px 10px; }

/* diamond mark fills */
.dot { transform: rotate(45deg); }
.fill-accent { background: var(--accent); }
.fill-ink { background: var(--ink); }
.ring-accent { border: 1.5px solid var(--accent); }

/* ---------- map ---------- */
.map-wrap { display: grid; grid-template-columns: 1fr; gap: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
@media (min-width: 900px) { .map-wrap { grid-template-columns: 1.55fr 1fr; } }
.map-canvas { position: relative; min-height: 380px; background: var(--bg-soft); overflow: hidden; }
.map-info { padding: 38px 34px; display: flex; flex-direction: column; gap: 22px; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .map-info { border-top: none; border-left: 1px solid var(--line); } }
.map-info .row .k { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.map-info .row .v { font-size: 16px; color: var(--ink); font-weight: 450; }
.map-info .addr { font-size: clamp(1.25rem, 1.8vw, 1.55rem); font-weight: 600; letter-spacing: -0.025em; line-height: 1.2; }

/* abstract street lines */
.street { position: absolute; background: var(--line-2); }
.street.h { height: 1px; left: 0; right: 0; }
.street.v { width: 1px; top: 0; bottom: 0; }
.street.major { background: var(--line-2); }
.ave {
  position: absolute; height: 18px; left: -10%; right: -10%; top: 46%;
  background: #eef0f6; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
  transform: rotate(-19deg); transform-origin: center;
}
.ave-label { position: absolute; top: 41%; left: 50%; transform: translateX(-50%) rotate(-19deg); font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.14em; color: var(--ink-3); text-transform: uppercase; }
.pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%); z-index: 3; }
.pin .dotpin { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 2px 10px rgba(40,40,90,.25); position: relative; z-index: 2; }
.pin .pulse { position: absolute; left: 50%; top: 7px; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--accent); opacity: .35; animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: .35; } 70% { transform: scale(4); opacity: 0; } 100% { opacity: 0; } }
.pin .flag { position: absolute; left: 20px; top: -6px; white-space: nowrap; background: #fff; border: 1px solid var(--line-2); border-radius: 5px; padding: 6px 11px; font-size: 12px; font-weight: 500; box-shadow: 0 4px 16px rgba(20,20,50,.07); }

/* ---------- CTA + form ---------- */
.cta-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 920px) { .cta-grid { grid-template-columns: 1fr 1fr; } }
.cta-left { padding-right: clamp(0px, 4vw, 56px); }
.cta-left h2 { margin-bottom: 22px; max-width: 14ch; }
.cta-contacts { margin-top: 40px; display: flex; flex-direction: column; gap: 2px; }
.cta-contacts a { display: flex; align-items: baseline; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); transition: color .15s; }
.cta-contacts a:last-child { border-bottom: 1px solid var(--line); }
.cta-contacts a .lbl { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); width: 92px; flex: none; }
.cta-contacts a .val { font-size: clamp(1.05rem, 1.5vw, 1.3rem); font-weight: 500; letter-spacing: -0.02em; }
.cta-contacts a:hover .val { color: var(--accent-ink); }

.form { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 6px; padding: clamp(26px, 3vw, 38px); }
.form .field { margin-bottom: 18px; }
.form label { display: block; font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 9px; }
.form input, .form textarea, .form select {
  width: 100%; font-family: inherit; font-size: 16px; color: var(--ink);
  background: #fff; border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 13px 15px; transition: border-color .15s, box-shadow .15s;
}
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form textarea { resize: vertical; min-height: 96px; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form .submit { width: 100%; justify-content: center; margin-top: 6px; }
.form .ok { display: none; text-align: center; padding: 30px 10px; }
.form .ok .check { width: 46px; height: 46px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; margin: 0 auto 16px; font-size: 22px; }
.form.sent .form-body { display: none; }
.form.sent .ok { display: block; }
.form .hint { font-size: 12.5px; color: var(--ink-3); margin-top: 14px; line-height: 1.5; }

/* ---------- page hero (subpages) ---------- */
.phero { padding-top: clamp(56px, 7vw, 96px); padding-bottom: clamp(44px, 5vw, 72px); }
.phero h1 { font-size: clamp(2.3rem, 5.2vw, 4.2rem); letter-spacing: -0.035em; line-height: 1.0; margin: 26px 0 26px; max-width: 18ch; }
.crumbs { font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.06em; color: var(--ink-3); display: flex; gap: 9px; align-items: center; }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { opacity: .5; }

/* agent / list rows */
.rows { border-top: 1px solid var(--line); }
.rrow { display: grid; grid-template-columns: 56px 1fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); align-items: start; }
.rrow .rno { font-family: var(--ff-mono); font-size: 13px; color: var(--ink-3); padding-top: 5px; }
.rrow h3 { margin-bottom: 8px; }
.rrow p { color: var(--ink-2); font-size: 15.5px; max-width: 64ch; }
@media (min-width: 760px){ .rrow { grid-template-columns: 56px 1.2fr 1.4fr; } .rrow p { padding-top: 4px; } }

/* two-col prose */
.cols2 { display: grid; grid-template-columns: 1fr; gap: 30px; }
@media (min-width: 820px){ .cols2 { grid-template-columns: 1fr 1fr; gap: 56px; } }
.cols2 p { color: var(--ink-2); }

/* stat strip */
.stats { display: grid; grid-template-columns: repeat(2,1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
@media (min-width: 760px){ .stats { grid-template-columns: repeat(4,1fr); } }
.stat { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 30px 26px; }
.stat .v { font-size: clamp(2rem, 3.4vw, 3rem); font-weight: 600; letter-spacing: -0.035em; }
.stat .v .u { color: var(--accent-ink); }
.stat .k { color: var(--ink-3); font-size: 14px; margin-top: 6px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-soft); }
.footer-inner { max-width: var(--frame-max); margin: 0 auto; padding: clamp(48px,6vw,80px) var(--gutter) 36px; }
.foot-top { display: grid; grid-template-columns: 1fr; gap: 40px; }
@media (min-width: 820px){ .foot-top { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.foot-brand .lead { font-size: 15px; max-width: 32ch; margin-top: 16px; }
.foot-col h4 { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; margin-bottom: 16px; }
.foot-col a { display: block; padding: 6px 0; color: var(--ink-2); font-size: 15px; transition: color .15s; }
.foot-col a:hover { color: var(--ink); }
.foot-bottom { margin-top: clamp(44px,5vw,68px); padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; font-size: 13px; color: var(--ink-3); }
.foot-bottom .mono { font-size: 12px; letter-spacing: 0.04em; }

/* ---------- mobile ---------- */
@media (max-width: 860px) {
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-cta { gap: 8px; }
  .mobile-menu { display: none; padding: 12px var(--gutter) 24px; border-bottom: 1px solid var(--line); background: #fff; }
  .mobile-menu.open { display: block; }
  .mobile-menu a { display: block; padding: 13px 0; font-size: 17px; border-bottom: 1px solid var(--line); color: var(--ink); }
  .mobile-menu .m-group { padding: 4px 0 8px; }
  .mobile-menu .m-label { font-family: var(--ff-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); padding: 16px 0 4px; }
  .mobile-menu .m-sub a { font-size: 15px; padding: 11px 0 11px 16px; color: var(--ink-2); }
  .mobile-menu .btn { margin-top: 18px; display: inline-flex; }
  .feat-grid { grid-template-columns: 1fr; }
  .sol-grid { grid-template-columns: 1fr; }
  .hero-meta { grid-template-columns: 1fr 1fr; }
  .hero-meta .cell { padding: 22px 18px; }
  .hero-meta .cell:nth-child(odd) { border-left: none; padding-left: 0; }
  .hero-meta .cell:nth-child(n+3) { border-top: 1px solid var(--line); }
}
.mobile-menu { display: none; }
@media (min-width: 861px) { .mobile-menu { display: none !important; } }

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