/* ╔══════════════════════════════════════════════════════════════════╗
   ║  i20 Digital Studio — main stylesheet                            ║
   ║  Full-width cyber-engineering theme, PCB grid, neon accent       ║
   ║  Two themes: dark (default) + light                              ║
   ╚══════════════════════════════════════════════════════════════════╝ */

/* ── TOKENS ──────────────────────────────────────────────────────── */
:root {
  --accent:        #7bd836;
  --accent-soft:   #8ee640;
  --accent-deep:   #62b228;
  --accent-glow:   rgba(123,216,54,.28);

  --font-sans:     'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display:  'Orbitron', 'Space Grotesk', sans-serif;
  --font-mono:     'Space Grotesk', ui-monospace, Consolas, monospace;

  --container:     1600px;
  --gutter:        clamp(20px, 4vw, 64px);
  --radius-sm:     8px;
  --radius:        16px;
  --radius-lg:     24px;
  --t-fast: 120ms ease;
  --t:      200ms ease;
}

/* Dark (default) */
:root, [data-theme="dark"] {
  --bg:            #000000;
  --bg-elev:       #0a0a0a;
  --bg-card:       #0d0d0d;
  --bg-card-2:     #111111;
  --bg-input:      #060606;
  --border:        rgba(123,216,54,.14);
  --border-strong: rgba(123,216,54,.32);
  --text:          #e8f0e0;
  --text-muted:    #8aa080;
  --text-dim:      #5c6e56;
  --grid-line:     rgba(123,216,54,.05);
  --pcb-line:      rgba(123,216,54,.04);
  --btn-text-on-accent: #050f00;
}

[data-theme="light"] {
  --bg:            #F5F8F1;
  --bg-elev:       #FFFFFF;
  --bg-card:       #FFFFFF;
  --bg-card-2:     #F2F6EC;
  --bg-input:      #FFFFFF;
  --border:        rgba(40,80,30,.14);
  --border-strong: rgba(40,80,30,.28);
  --text:          #102018;
  --text-muted:    #4A5A42;
  --text-dim:      #7C8C74;
  --grid-line:     rgba(40,80,30,.04);
  --pcb-line:      rgba(40,80,30,.05);
  --accent:        #62b228;
  --accent-soft:   #7bd836;
  --accent-deep:   #4d9020;
  --accent-glow:   rgba(98,178,40,.20);
  --btn-text-on-accent: #FFFFFF;
}

/* ── RESET ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--t), color var(--t);
  overflow-x: hidden;
}
h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: 500; }
img, svg, video { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--accent); }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }
address { font-style: normal; }

/* ── LAYOUT ──────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Show image based on theme — !important нужен, иначе перебивается .hero__visual img */
.img-light { display: none !important; }
[data-theme="light"] .img-dark  { display: none !important; }
[data-theme="light"] .img-light { display: block !important; }

/* PCB grid background — full-width section helper */
.pcb-bg {
  position: relative;
  isolation: isolate;
}
.pcb-bg::before {
  content: '';
  position: absolute; inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--pcb-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--pcb-line) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
}

/* SVG icon default */
.i { display: inline-block; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── HEADER ──────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(0,0,0,.80);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] .site-header {
  background: rgba(245,248,241,.82);
}
.header__inner {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  display: flex; align-items: center; gap: clamp(20px, 3vw, 40px);
  padding: 22px var(--gutter);
}
.brand {
  display: inline-flex; align-items: center; gap: 14px;
  flex-shrink: 0;
  color: var(--text);
}
.brand__logo {
  height: 44px; width: 91px;
  color: var(--text);
  fill: currentColor;
  display: block;
}
.brand__label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 10px; letter-spacing: .22em;
  line-height: 1.15;
  color: var(--text-muted);
  text-transform: uppercase;
}

.nav { margin-left: auto; }
.nav__list { display: flex; gap: clamp(20px, 2.4vw, 40px); }
.nav__list a {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text);
  padding: 6px 0;
  position: relative;
}
.nav__list a:hover { color: var(--accent); }
.nav__list a::after {
  content: ''; position: absolute; inset: auto 0 -4px;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--t);
}
.nav__list a:hover::after { transform: scaleX(1); }

.header__actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  display: none; /* hidden until theme-switcher UX is finalized */
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: var(--t);
  margin-right: 20px;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--border-strong); }
.theme-toggle svg { display: none; }
[data-theme="dark"]  .i--sun  { display: block; }
[data-theme="light"] .i--moon { display: block; }

.burger { display: none; width: 40px; height: 40px; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.burger span { display: block; width: 22px; height: 2px; background: var(--text); transition: var(--t); }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  padding: 16px var(--gutter);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu ul { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu a {
  display: block; padding: 12px 8px; font-size: 16px; font-weight: 500;
  border-radius: var(--radius-sm);
}
.mobile-menu a:hover { background: var(--bg-card); }
.mobile-menu .btn { display: block; text-align: center; margin-top: 8px; }

/* ── BUTTONS ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase;
  padding: 12px 22px;
  border-radius: 999px;
  transition: all var(--t);
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn {
  font-family: var(--font-display);
  border-radius: 6px;
}
.btn--primary {
  background: var(--accent);
  color: var(--btn-text-on-accent);
  border-radius: 6px;
}
.btn--primary:hover {
  background: var(--accent-soft);
  color: var(--btn-text-on-accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
  transform: translateY(-1px);
}
/* Outlined CTA — для хедера и второстепенных кнопок */
.btn--outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
}
.btn--outline:hover {
  background: var(--accent);
  color: var(--btn-text-on-accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}
.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--lg { padding: 16px 36px; font-size: 14px; }
.btn--sm { padding: 8px 16px; font-size: 11px; }

/* ── ACCENT / KICKER / LINKS ────────────────────────────────────── */
.accent { color: var(--accent); }
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elev);
  width: fit-content;
}
.kicker__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.link--arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600;
  color: var(--accent);
  text-transform: uppercase; letter-spacing: .08em;
}
.link--arrow::after { content: '↗'; font-size: 16px; }

/* ── SECTION HEAD ────────────────────────────────────────────────── */
.section-head {
  display: flex; flex-direction: column; gap: 16px;
  margin-bottom: 56px;
  max-width: 880px;
}
.section-head--row {
  flex-direction: row; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: 24px; max-width: 100%;
}
.section-head__title {
  font-size: clamp(28px, 4.4vw, 56px);
  font-weight: 800; line-height: 1.05;
  letter-spacing: -.02em;
}
.section-head__lead {
  font-size: clamp(15px, 1.4vw, 17px);
  color: var(--text-muted);
  max-width: 720px;
}

/* Features (generic feature list with icon) */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 18px;
}
.features li {
  display: flex; align-items: flex-start; gap: 12px;
}
.features__icon {
  width: 28px; height: 28px;
  padding: 6px;
  border-radius: 50%;
  background: var(--bg-card-2);
  color: var(--accent);
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
  margin-top: 2px;
}
.feature__body {
  display: flex; flex-direction: column; gap: 2px;
}
.feature__title {
  font-size: 13.5px; font-weight: 500; color: var(--text); line-height: 1.3;
}
.feature__text {
  font-size: 12px; color: var(--text-muted); line-height: 1.3;
}

/* Registry badge */
.product__registry {
  display: flex; align-items: center; gap: 8px;
  margin-block: 18px 0;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  font-size: 12px; color: var(--text-muted); line-height: 1.4;
}
.product__registry-icon {
  width: 16px; height: 16px;
  color: var(--accent);
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}

/* ── HERO ────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: clamp(40px, 6vw, 80px) 0 clamp(48px, 8vw, 100px);
  overflow: hidden;
  background: var(--bg);
}
.hero::before {
  content: ''; position: absolute; pointer-events: none;
  width: 700px; height: 700px;
  background: var(--accent-glow); filter: blur(120px);
  border-radius: 50%;
  top: -150px; right: -150px; opacity: .45;
  z-index: 0;
}

.hero__inner {
  position: relative; z-index: 1;
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  grid-template-areas: "copy visual";
  gap: 40px 56px;
  align-items: center;
}
.hero__copy {
  grid-area: copy;
  display: flex; flex-direction: column; gap: 22px;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 62px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: .02em;
}
.hero__lead {
  color: var(--text-muted);
  font-size: clamp(15px, 1.3vw, 18px);
  max-width: 600px;
}
.hero__visual {
  grid-area: visual;
  margin: 0;
  position: relative;
}
.hero__visual img { width: 100%; max-width: 620px; margin-inline: auto; display: block; }

/* Hero CTA buttons row */
.hero__cta {
  display: flex; gap: 14px; flex-wrap: wrap;
  align-items: center;
}

/* ── METRICS SECTION ─────────────────────────────────────────────── */
.metrics-section {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
}
.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  padding: 0;
}
.metric {
  display: grid;
  grid-template-areas:
    "icon value"
    "icon label";
  grid-template-columns: auto 1fr;
  gap: 2px 12px;
  padding: 28px 24px;
  border-right: 1px solid var(--border);
  transition: background var(--t);
}
.metric:last-child { border-right: 0; }
.metric:hover { background: var(--bg-card); }
.metric__icon {
  grid-area: icon;
  width: 28px; height: 28px;
  color: var(--accent);
  align-self: center;
  flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.metric__value {
  grid-area: value;
  font-family: var(--font-display);
  font-weight: 700; font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1; color: var(--accent); letter-spacing: .01em;
}
.metric__value span { color: var(--accent); }
.metric__label {
  grid-area: label;
  font-size: 11px; color: var(--text-muted);
  line-height: 1.35;
}

/* ── PRODUCTS ────────────────────────────────────────────────────── */
.products { padding-block: clamp(64px, 10vw, 120px); }

.product {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 48px);
  margin-bottom: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "copy   visual"
    "stats  stats";
  gap: clamp(28px, 4vw, 64px);
  position: relative;
  overflow: hidden;
  transition: border-color var(--t);
}
.product:hover { border-color: var(--border-strong); }
.product__copy {
  grid-area: copy;
  display: flex; flex-direction: column; gap: 18px;
  min-width: 0;
}
.product__head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
}
.product__num {
  font-family: var(--font-mono);
  font-weight: 700; font-size: clamp(22px, 2vw, 28px);
  color: var(--accent);
  letter-spacing: -.02em;
}
.product__tag {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--text-muted);
  display: inline-flex; align-items: center; gap: 8px;
}
.badge {
  background: var(--accent); color: var(--btn-text-on-accent);
  padding: 3px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: .04em;
}
.badge--alt { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.product__name-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px;
  margin-bottom: 6px;
}
.product__name {
  font-size: clamp(40px, 4.8vw, 64px);
  font-weight: 800; line-height: 1;
  letter-spacing: -.02em;
}
.product__subtitle {
  color: var(--accent);
  font-size: clamp(14px, 1.2vw, 16px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.product__desc { color: var(--text-muted); font-size: 15px; }
.product__cta { display: flex; gap: 12px; flex-wrap: wrap; }
.product__visual {
  grid-area: visual;
  margin: 0;
  display: flex; align-items: center; justify-content: center;
  min-width: 0;
}
.product__visual img {
  width: 100%; max-width: 540px;
  filter: drop-shadow(0 24px 64px var(--accent-glow));
}
.product__stats {
  grid-area: stats;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding-top: 20px;
  margin-top: 8px;
  border-top: 1px solid var(--border);
}
.product__stats > div {
  display: grid;
  grid-template-columns: 38px 1fr;
  grid-template-rows: auto auto;
  column-gap: 11px;
  row-gap: 2px;
  align-items: center;
  padding: 14px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
}
.stat__icon {
  grid-column: 1; grid-row: 1 / 3;
  width: 38px; height: 38px;
  padding: 9px;
  border-radius: 8px;
  background: var(--bg-card-2);
  color: var(--accent);
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
  align-self: center;
}
.product__stats strong {
  grid-column: 2; grid-row: 1;
  font-family: var(--font-mono);
  font-weight: 700; font-size: clamp(12px, 1.1vw, 15px);
  color: var(--accent);
  line-height: 1.2;
  align-self: flex-end;
  overflow-wrap: break-word;
  word-break: break-word;
}
.product__stats span {
  grid-column: 2; grid-row: 2;
  font-size: 11px; color: var(--text-muted); line-height: 1.3;
  align-self: flex-start;
}
.product__stats--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

/* ── DEVELOPMENT ─────────────────────────────────────────────────── */
.development {
  padding-block: clamp(64px, 10vw, 120px);
  background: var(--bg-elev);
  border-block: 1px solid var(--border);
  position: relative;
  background-image:
    linear-gradient(var(--pcb-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--pcb-line) 1px, transparent 1px);
  background-size: 80px 80px;
}
.experience-pill {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-size: 13px; color: var(--text-muted);
  width: fit-content;
}
.experience-pill strong {
  color: var(--accent); font-weight: 700; letter-spacing: .04em;
  font-size: 11px; text-transform: uppercase;
}

/* Development hero — 2-col layout */
.development__hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  margin-bottom: 48px;
}
.development__copy {
  display: flex; flex-direction: column; gap: 28px;
}
.development__title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 42px);
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.development__lead {
  color: var(--text-muted);
  font-size: clamp(14px, 1.1vw, 17px);
  line-height: 1.6;
  max-width: 480px;
}
.development__visual-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.development__visual { margin: 0; }
.development__visual img {
  width: 100%; display: block;
  border-radius: var(--radius-lg);
}
.development__features {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  padding: 14px;
  gap: 10px;
  pointer-events: none;
}
.dev-feature {
  background: color-mix(in srgb, var(--bg-card) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: auto;
  max-width: 220px;
}
.dev-feature header {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700;
  letter-spacing: .12em; color: var(--accent);
  display: flex; align-items: center; gap: 8px;
}
.dev-feature header .features__icon { width: 20px; height: 20px; padding: 3px; flex-shrink: 0; }
.dev-feature__arrow { width: 12px; height: 12px; margin-left: auto; color: var(--accent); flex-shrink: 0; }
.dev-feature p { font-size: 12px; color: var(--text-muted); line-height: 1.4; margin: 0; }
.dev-feature--tl { align-self: start; justify-self: start; }
.dev-feature--tr { align-self: start; justify-self: end; }
.dev-feature--bl { align-self: end; justify-self: start; }
.dev-feature--br { align-self: end; justify-self: end; }

/* Steps */
.steps {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 36px);
  margin-block: 32px;
}
.steps__title {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.steps__list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
}
.steps__list li {
  display: flex; flex-direction: row; align-items: flex-start; gap: 14px;
  padding: 0 0 0 32px;
  position: relative;
}
.steps__list li:first-child { padding-left: 0; }
.steps__list li:not(:last-child)::after {
  content: '›';
  position: absolute; right: -10px; top: 50%; transform: translateY(-50%);
  color: var(--accent); font-size: 24px; font-weight: 700; line-height: 1;
}
.steps__icon-wrap {
  width: 52px; height: 52px; flex-shrink: 0;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.steps__icon {
  width: 26px; height: 26px;
  color: var(--accent);
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.steps__text {
  display: flex; flex-direction: column; gap: 6px;
  padding-top: 4px;
}
.steps__num {
  font-family: var(--font-mono);
  font-size: 13px; font-weight: 700;
  letter-spacing: .1em; color: var(--text);
  line-height: 1.2;
}
.steps__list p { font-size: 12.5px; color: var(--text-muted); line-height: 1.4; margin: 0; }

/* Dev stats + CTA */
.dev-stats {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 2.2vw, 28px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
}
.dev-stats__list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.dev-stats__list li {
  display: grid;
  grid-template-columns: 38px 1fr;
  grid-template-rows: auto auto;
  column-gap: 11px;
  row-gap: 2px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card-2);
}
.dev-stats__list .features__icon {
  grid-column: 1; grid-row: 1 / 3;
  width: 38px; height: 38px;
  padding: 9px;
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--accent);
  align-self: center;
}
.dev-stats__list strong {
  grid-column: 2; grid-row: 1;
  font-family: var(--font-mono);
  font-weight: 700; font-size: clamp(13px, 1.15vw, 16px);
  color: var(--accent);
  line-height: 1.15;
  align-self: flex-end;
}
.dev-stats__list strong span { color: var(--accent); }
.dev-stats__list li > span {
  grid-column: 2; grid-row: 2;
  font-size: 11px; color: var(--text-muted); line-height: 1.3;
  align-self: flex-start;
}

/* ── GOS ─────────────────────────────────────────────────────────── */
.gos { padding-block: clamp(64px, 10vw, 120px); }
.gos__split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  margin-bottom: 24px;
}
.gos__col { display: flex; flex-direction: column; gap: 18px; }

/* Bullets with icons */
.gos__bullets { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.gos__bullets li {
  display: flex; align-items: flex-start; gap: 12px;
  color: var(--text-muted); font-size: 14px; line-height: 1.4;
}
.gos__bullet-icon {
  width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px;
  color: var(--accent);
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}

/* Map — средняя колонка gos__split */
.gos__map { margin: 0; }
.gos__map img {
  width: 100%;
  object-fit: contain;
  opacity: .95;
}

/* Partners grid — 8 cards 4×2 */
.gos__grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px; list-style: none; margin: 0; padding: 0;
}
.gos-card {
  display: flex; flex-direction: column; gap: 14px;
  padding: 20px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--bg-card);
}
.gos-card__logo {
  height: 60px; width: 100%;
  object-fit: contain; object-position: center;
}
.gos-card__title {
  font-size: 14px; font-weight: 700;
  color: var(--text); line-height: 1.3;
}
.gos-card__desc {
  font-size: 12px; color: var(--text-muted); line-height: 1.45; margin: 0;
}

/* Bottom: mission + stats */
.gos__bottom {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(0, 3fr);
  gap: 8px;
}
.gos__mission {
  display: flex; flex-direction: row; align-items: flex-start; gap: 16px;
  padding: 20px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--bg-card);
}
.gos__mission-icon {
  width: 32px; height: 32px; flex-shrink: 0; margin-top: 2px;
  color: var(--accent);
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.gos__mission p { font-size: 13px; color: var(--text-muted); line-height: 1.55; margin: 0; }
.gos__mission strong { color: var(--accent); font-weight: 600; }

/* Stats row inside gos__bottom */
.gos__stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px;
  list-style: none; margin: 0; padding: 0;
}

/* ── DOCUMENTS ───────────────────────────────────────────────────── */
.documents {
  padding-block: clamp(64px, 10vw, 120px);
  background: var(--bg-elev);
  border-block: 1px solid var(--border);
}
/* Вариант для вставки внутрь legal-страницы */
.documents--inline {
  background: var(--bg);
  border-block: none;
  padding-top: clamp(16px, 2.5vw, 30px);
}
.documents--inline .section-head__title {
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -.01em;
}
.documents--inline .section-head__title .accent { color: var(--text); }
.documents--inline .section-head__lead {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: none;
}
/* Уменьшить нижний отступ legal-page когда за ним идёт documents--inline */
.legal-page--compact-bottom { padding-block-end: clamp(32px, 5vw, 60px); }
.docs { display: flex; flex-direction: column; }
.docs__group-title {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}
.docs__list + .docs__group-title { margin-top: 36px; }
.docs__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  list-style: none; margin: 0; padding: 0;
}
.doc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--t);
  overflow: hidden;
}
.doc:hover { border-color: var(--border-strong); }
.doc > a {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  color: inherit; text-decoration: none;
}
.doc--pending {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  opacity: 0.4;
  pointer-events: none;
}
.doc .features__icon { width: 36px; height: 36px; padding: 8px; flex-shrink: 0; color: var(--accent); }
.doc div { flex: 1; min-width: 0; }
.doc strong { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 3px; }
.doc div span { display: block; font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.doc__arrow {
  width: 16px; height: 16px; flex-shrink: 0;
  color: var(--text-dim); opacity: 0.7;
  transition: opacity var(--t), color var(--t);
}
.doc > a:hover .doc__arrow { color: var(--accent); opacity: 1; }
.doc__soon {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 9px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-dim);
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
}

/* ── LEGAL PAGES ─────────────────────────────────────────────────── */
.legal-page { padding-block: clamp(48px, 8vw, 100px) clamp(64px, 10vw, 120px); }
.legal-page__inner { max-width: 820px; }
.legal-page h1 { font-size: clamp(24px, 4vw, 40px); margin-bottom: 6px; }
.legal-page .updated { font-size: 12px; color: var(--text-dim); font-family: var(--font-mono); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 48px; display: block; }
.legal-page h2 { font-size: clamp(14px, 2vw, 18px); margin-top: 40px; margin-bottom: 10px; padding-top: 24px; border-top: 1px solid var(--border); }
.legal-page p { color: var(--text-muted); margin-bottom: 14px; font-size: 15px; line-height: 1.65; }
.legal-page ul { list-style: disc; padding-left: 22px; margin-bottom: 16px; }
.legal-page ul li { color: var(--text-muted); margin-bottom: 5px; font-size: 15px; line-height: 1.55; }
.legal-page table { width: 100%; border-collapse: collapse; margin-bottom: 24px; font-size: 14px; }
.legal-page th, .legal-page td { text-align: left; padding: 9px 14px; border: 1px solid var(--border); }
.legal-page th { background: var(--bg-card); font-weight: 700; color: var(--text); font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; width: 38%; }
.legal-page td { color: var(--text-muted); background: var(--bg); }
.legal-page td code, .legal-page p code, .legal-page li code { font-family: var(--font-mono); font-size: 13px; color: var(--accent); background: var(--bg-card); padding: 1px 6px; border-radius: 4px; border: 1px solid var(--border); }
.legal-page a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.legal-header { position: sticky; top: 0; z-index: 100; background: rgba(0,0,0,.80); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
[data-theme="light"] .legal-header { background: rgba(245,248,241,.82); }
.brand__mark { display: block; height: 30px; width: auto; }
.legal-nav__links { display: flex; gap: clamp(12px, 1.8vw, 24px); flex-wrap: wrap; margin-left: auto; }
.legal-nav__links a { font-family: var(--font-display); font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--text); padding: 6px 0; position: relative; }
.legal-nav__links a::after { content: ''; position: absolute; inset: auto 0 -4px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform var(--t); }
.legal-nav__links a:hover, .legal-nav__links a[aria-current] { color: var(--accent); }
.legal-nav__links a:hover::after, .legal-nav__links a[aria-current]::after { transform: scaleX(1); }
.legal-footer { border-top: 1px solid var(--border); background: var(--bg); margin-top: clamp(48px, 8vw, 96px); }
.legal-footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 20px; font-size: 12px; color: var(--text-dim); }

/* ── FOOTER ──────────────────────────────────────────────────────── */
.site-footer {
  padding-block: clamp(48px, 6vw, 80px) 24px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.5fr repeat(2, 1fr) 1.2fr;
  gap: clamp(24px, 3vw, 48px);
  margin-bottom: 48px;
}
.footer__brand { display: flex; flex-direction: column; gap: 16px; max-width: 320px; }
.footer__about { font-size: 13px; color: var(--text-muted); }
.footer__col h6 {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.footer__col ul { display: flex; flex-direction: column; gap: 8px; }
.footer__col li a { font-size: 13px; color: var(--text-muted); }
.footer__col li a:hover { color: var(--text); }
.footer__contacts address p { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.footer__qr-wrap { display: flex; flex-direction: column; gap: 14px; align-items: flex-end; width: 100%; }
.footer__qr-wrap > div { width: 100%; text-align: right; }
.footer__qr { display: block; width: 120px; height: 120px; border-radius: 10px; border: 1px solid var(--border); background: #fff; padding: 6px; }
.footer__qr-hint { font-size: 11px; color: var(--text-dim); line-height: 1.4; text-align: right; margin-bottom: 10px; }
.footer__contacts h6 { text-align: right; }

.footer__bottom {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text-dim);
}
.legal-links { display: flex; gap: 20px; flex-wrap: wrap; }
.legal-links a:hover { color: var(--text); }

/* ── RESPONSIVE ──────────────────────────────────────────────────── */
@media (max-width: 1440px) {
  /* 6-column product stats → 3×2 grid на промежуточных экранах */
  .product__stats--6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1100px) {
  /* Hero — single column, visual below copy */
  .hero__inner {
    grid-template-columns: 1fr;
    grid-template-areas: "copy" "visual";
  }
  .hero__visual img { max-width: 560px; margin-inline: auto; }

  /* Metrics — 3 колонки */
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric:nth-child(3) { border-right: 0; }
  .metric:nth-child(4),
  .metric:nth-child(5) { border-top: 1px solid var(--border); }
  .metric:nth-child(4) { border-right: 0; } /* 24/7 — последний в ряду 2 */

  /* Header — сжать gap на планшете */
  .header__actions { gap: 4px; }
  .header__inner { gap: 16px; }

  .product { grid-template-columns: 1fr; grid-template-areas: "copy" "visual" "stats"; }
  .product__stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .gos__split { grid-template-columns: 1fr; }
  .development__hero { grid-template-columns: 1fr; }
  .development__title { font-size: clamp(26px, 5vw, 40px); }
  .steps__list { grid-template-columns: repeat(2, 1fr); gap: 24px 8px; }
  .steps__list li:not(:last-child)::after { display: none; }
  .dev-stats { grid-template-columns: 1fr; }
  .dev-stats__list { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .gos__grid { grid-template-columns: repeat(2, 1fr); }
  .gos__bottom { grid-template-columns: 1fr; }
  .gos__stats { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: 1.5fr 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; max-width: none; }
}
@media (max-width: 768px) {
  .nav { display: none; }
  .header__actions .btn--outline { display: none; }
  .burger { display: inline-flex; }
  .hero__visual { display: none; }    /* убираем иллюстрацию на мобиле */

  /* Metrics — 2 колонки на mobile, кнопка "смотреть все" */
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 20px 16px;
  }
  .metric:nth-child(3) { border-top: 0; }
  .metric:nth-child(odd) { border-right: 1px solid var(--border); }
  .metric:nth-child(4),
  .metric:nth-child(5) { border-bottom: 0; }

  .product__stats, .dev-stats__list { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .gos__grid { grid-template-columns: repeat(2, 1fr); }
  .gos__stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .docs__list { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  .development__hero { gap: 24px; }
  .dev-feature { max-width: 160px; padding: 10px 12px; }
  .dev-feature p { font-size: 11px; }
}
@media (max-width: 480px) {
  .section-head__title { font-size: 26px; }
  .product { padding: 20px; }
  .product__name { font-size: 38px; }
  .legal-links { flex-direction: column; gap: 8px; }
  .metrics { grid-template-columns: 1fr; }
  .metric { border-right: 0; border-bottom: 1px solid var(--border); padding: 16px 20px; }
  .metric:last-child { border-bottom: 0; }
  .metric:nth-child(odd) { border-right: 0; }
}

/* ── ACCESSIBILITY ───────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
