/* System-Integra redesign — base styles
   Technical / engineering aesthetic with the original blue palette. */

:root {
  /* Palette — modernised blues from the original site */
  --ink:        #0b1220;    /* near-black text */
  --ink-2:      #1a2337;
  --mute:       #5b6a82;
  --mute-2:     #8894a8;
  --line:       #dfe5ee;
  --line-2:     #eef2f8;
  --bg:         #f5f7fb;
  --panel:      #ffffff;
  --panel-2:    #fafbfd;

  /* Brand blues (distilled from the old hero) */
  --blue-50:    #eaf2fb;
  --blue-100:   #d5e5f6;
  --blue-300:   #7aa8d6;
  --blue-500:   #3a7ebf;
  --blue-600:   #2a68a8;
  --blue-700:   #1f5289;
  --blue-900:   #0f2e54;

  /* Accent — signal green for status */
  --ok:         #2bb673;
  --warn:       #f0a020;
  --err:        #d94848;

  /* Type */
  --font-sans: 'IBM Plex Sans', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --font-display: 'IBM Plex Sans', ui-sans-serif, system-ui, sans-serif;

  /* Misc */
  --r: 10px;
  --r-lg: 16px;
  --shadow-sm: 0 1px 0 rgba(15,46,84,0.04), 0 1px 2px rgba(15,46,84,0.06);
  --shadow-md: 0 4px 12px rgba(15,46,84,0.06), 0 1px 2px rgba(15,46,84,0.04);
  --shadow-lg: 0 20px 40px -20px rgba(15,46,84,0.25);

  --maxw: 1280px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 15px;
  line-height: 1.55;
}

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

/* Subtle grid background used in hero / panels */
.grid-bg {
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -1px -1px;
}

/* ============ Top bar (utility strip) ============ */
.utilbar {
  background: var(--ink);
  color: #c8d1e0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
}
.utilbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: space-between;
}
.utilbar .pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 2px 10px;
  border: 1px solid #2b374e;
  border-radius: 999px;
  color: #9fb3d1;
}
.utilbar .dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(43,182,115,0.55);
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0   rgba(43,182,115,0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(43,182,115,0);    }
  100% { box-shadow: 0 0 0 0   rgba(43,182,115,0);    }
}
.utilbar a:hover { color: #fff; }
.utilbar .sep { color: #3a4762; }

/* ============ Header ============ */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; letter-spacing: -0.01em;
}
.logo-mark {
  width: 30px; height: 30px;
  display: block;
  flex-shrink: 0;
}
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text .name {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: 0.04em;
  display: inline-flex; align-items: center;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.logo-text .name .nm-blue {
  background: linear-gradient(180deg, #4a9ce8 0%, #1a5a9c 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo-text .name .nm-gray {
  background: linear-gradient(180deg, #a5b2bd 0%, #5a6572 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo[style*="color:#fff"] .logo-text .name .nm-blue {
  background: linear-gradient(180deg, #7ab7f0 0%, #4a9ce8 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo[style*="color:#fff"] .logo-text .name .nm-gray {
  background: linear-gradient(180deg, #d5dce4 0%, #a5b2bd 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo-text .name .name-chip { display: inline-block; }
.logo-text .sub {
  font-size: 11px; color: var(--mute);
  margin-top: 4px; letter-spacing: 0.01em;
}

.nav {
  display: flex; gap: 4px;
  justify-content: center;
}
.nav a {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  transition: background 120ms, color 120ms;
}
.nav a:hover { background: var(--line-2); }
.nav a.active {
  background: var(--ink);
  color: #fff;
}

.header-cta {
  display: flex; align-items: center; gap: 10px;
}
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  border: 1px solid transparent;
  transition: transform 120ms, background 120ms, border-color 120ms;
}
.btn:hover { transform: translateY(-1px); }
.btn-ghost {
  color: var(--ink);
  border-color: var(--line);
  background: #fff;
}
.btn-ghost:hover { border-color: var(--ink); }
.btn-primary {
  background: var(--ink);
  color: #fff;
}
.btn-primary:hover { background: var(--blue-700); }
.btn-blue {
  background: var(--blue-600);
  color: #fff;
}
.btn-blue:hover { background: var(--blue-700); }
.btn-arrow {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 2px;
  flex: 0 0 auto;
  font-size: 0;
  line-height: 0;
  color: var(--blue-600);
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8 L8.2 3.8'/%3E%3Cpath d='M4.3 4 H8.4 V8.1'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8 L8.2 3.8'/%3E%3Cpath d='M4.3 4 H8.4 V8.1'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: 16px 16px;
  mask-size: 16px 16px;
}

/* Универсальная стрелка в ссылках-карточках (цены, svc-cell, и пр.):
   текст «↗» внутри <span class="arr"> заменяется на SVG-маску,
   чтобы глиф не падал на emoji-fallback и не превращался в tofu. */
.arr{
  display: inline-block;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  font-size: 0;
  line-height: 0;
  color: currentColor;
  background-color: currentColor;
  vertical-align: -2px;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8 L8.2 3.8'/%3E%3Cpath d='M4.3 4 H8.4 V8.1'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8 L8.2 3.8'/%3E%3Cpath d='M4.3 4 H8.4 V8.1'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* «подробнее» рядом с стрелкой в карточках архива */
.svc-more{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--blue-600);
}

/* Стрелка в .price (ряд «цена ↗» внутри svc-cell) — всегда фирменный синий */
.price .arr,
.svc-cell .arr{
  color: var(--blue-600);
  background-color: var(--blue-600);
}

/* ============ Shared blocks ============ */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--blue-600);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before {
  content: ""; width: 18px; height: 1px; background: var(--blue-600);
}

.section {
  padding: 96px 0;
}
.section-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 32px;
  margin-bottom: 40px;
}
.section-head h2 {
  margin: 12px 0 0;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.05;
  max-width: 18ch;
}

.bracket {
  font-family: var(--font-mono);
  color: var(--blue-600);
  font-weight: 500;
}

/* Cards */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  transition: border-color 150ms, transform 200ms, box-shadow 200ms;
}
.card:hover {
  border-color: var(--blue-300);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: #c8d1e0;
  padding: 80px 0 32px;
  margin-top: 96px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid #1d2a42;
}
.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #6b7a94;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
  margin: 0 0 16px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { padding: 4px 0; font-size: 14px; }
.footer-grid a:hover { color: #fff; }
.footer-bottom {
  padding-top: 24px;
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 12px;
  color: #6b7a94;
}

/* Monospace labels */
.mono { font-family: var(--font-mono); }
.mono-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--mute);
  background: var(--panel);
  letter-spacing: 0.02em;
}

/* Hero H1 .num — hard guarantee vs FSE overrides */
.e-hero-main h1 .num,
body .e-hero-main h1 .num,
.wp-site-blocks .e-hero-main h1 .num{
  font-family: var(--font-mono) !important;
  font-weight: 500 !important;
  font-size: 34px !important;
  line-height: 1.25 !important;
  letter-spacing: -0.01em !important;
  color: #6d88b5 !important;
  display: block !important;
  margin-top: 28px !important;
  text-wrap: balance;
}
@media (max-width: 1200px){
  .e-hero-main h1 .num,
  body .e-hero-main h1 .num{ font-size: 28px !important; margin-top: 22px !important; }
}
@media (max-width: 900px){
  .e-hero-main h1 .num,
  body .e-hero-main h1 .num{ font-size: 22px !important; margin-top: 18px !important; }
}

/* Hero H1 — чуть компактнее общего h1 */
.e-hero-main{
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(32px, 4vw, 72px);
  align-items: start;
  margin-top: 24px;
}
.e-hero-main h1{
  font-size: clamp(32px, 4.6vw, 56px) !important;
  line-height: 1.08;
  margin: 0 !important;
  align-self: start;
  text-align: right;
  text-wrap: balance;
}
@media (max-width: 960px){
  .e-hero-main h1{ text-align: left; }
}
.e-hero-lede{
  padding-top: 8px; /* оптический alignment с верхушкой h1 */
}
.e-hero-lede p{
  margin: 0 0 20px;
  color: var(--mute);
  font-size: 16px;
  line-height: 1.55;
  max-width: 44ch;
}
.e-hero-lede .ctas{
  display: flex; gap: 12px; flex-wrap: wrap;
}
@media (max-width: 960px){
  .e-hero-main{ grid-template-columns: 1fr; gap: 28px; }
  .e-hero-lede{ padding-top: 0; }
}

/* Tweaks panel (shared) */
.tweaks-panel {
  position: fixed; bottom: 20px; right: 20px;
  z-index: 1000;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  min-width: 220px;
  display: none;
}
.tweaks-panel[data-open="true"] { display: block; }
.tweaks-panel h5 {
  margin: 0 0 10px; font-family: var(--font-mono);
  font-size: 11px; text-transform: uppercase; color: var(--mute); letter-spacing: 0.06em; font-weight: 500;
}
.tweaks-panel .opt-row { display: flex; flex-direction: column; gap: 6px; }
.tweaks-panel select {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-mono); font-size: 12px;
  background: var(--panel-2);
}

@media (max-width: 960px) {
  .nav { display: none; }
  .section { padding: 64px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
