:root {
  --bg: #f4f3ef;
  --paper: #fffcf8;
  --ink: #16181d;
  --muted: #4a4f5c;
  --line: #e3e0d8;
  --dark: #12141a;
  --lime: #e4ff4a;
  --lime-2: #d4f230;
  --header: 72px;
  --wrap: 1160px;
  --shadow: 0 20px 50px rgba(18, 20, 26, 0.08);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  font-size: 17px;
  line-height: 1.55;
}
img, video { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
::selection { background: var(--lime); color: var(--ink); }

html[lang="ru"] .en { display: none !important; }
html[lang="en"] .ru { display: none !important; }
body.lock { overflow: hidden; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip {
  position: absolute;
  left: 16px;
  top: -40px;
  background: var(--lime);
  color: var(--ink);
  padding: 8px 12px;
  z-index: 50;
}
.skip:focus { top: 12px; }

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

.header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--header);
  display: flex;
  align-items: center;
  background: rgba(244, 243, 239, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
}
.header.scrolled { border-bottom-color: var(--line); }
.header .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-right: auto;
}
.mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--dark);
  color: var(--lime);
  display: grid;
  place-items: center;
  font-size: 13px;
  letter-spacing: 0;
}
.nav-panel {
  display: flex;
  align-items: center;
  gap: 22px;
}
.nav-panel a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: #2a2e38;
}
.nav-panel a:hover { color: var(--ink); }
.nav-cta {
  background: var(--dark);
  color: white !important;
  border-radius: 999px;
  padding: 8px 14px;
}
.lang {
  display: flex;
  padding: 3px;
  border-radius: 999px;
  background: #e7e4dc;
}
.lang button {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.lang button[aria-pressed="true"] {
  background: var(--dark);
  color: white;
}
.burger {
  display: none;
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.burger > span:not(.sr-only) {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--ink);
}

.hero {
  position: relative;
  min-height: calc(100svh - var(--header));
  display: flex;
  align-items: stretch;
  color: white;
  overflow: hidden;
  background: #0c0e12;
}
.hero-media, .hero-shade {
  position: absolute;
  inset: 0;
}
.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 68% 45%;
}
.hero-shade {
  background:
    linear-gradient(90deg, rgba(8, 10, 14, 0.9) 0%, rgba(8, 10, 14, 0.72) 36%, rgba(8, 10, 14, 0.22) 62%, rgba(8, 10, 14, 0.08) 100%),
    linear-gradient(180deg, rgba(8, 10, 14, 0.12) 0%, rgba(8, 10, 14, 0.05) 40%, rgba(8, 10, 14, 0.45) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - var(--header));
  padding: 36px 0 28px;
}
.kicker, .eyebrow {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow { color: var(--lime); }
.kicker { color: var(--muted); }
h1, h2, h3, p { margin-top: 0; }
h1 {
  margin: 0 0 16px;
  max-width: 15em;
  font-size: clamp(34px, 4.3vw, 60px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 800;
}
.lead {
  max-width: 40rem;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 17px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  background: var(--dark);
  color: white;
}
.btn-lime { background: var(--lime); color: var(--ink); }
.btn-lime:hover { background: var(--lime-2); }
.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.45);
  color: white;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin: auto 0 0;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  list-style: none;
}
.stats strong {
  display: block;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 6px;
}
.stats span { color: rgba(255, 255, 255, 0.78); font-size: 14px; }
.video-toggle {
  position: absolute;
  right: 20px;
  top: 16px;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(12, 14, 18, 0.45);
  color: white;
  border-radius: 999px;
  min-height: 40px;
  padding: 8px 14px;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

section { padding: 88px 0; }
section.hero { padding: 0; }
h2 {
  margin: 0 0 28px;
  max-width: 16em;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.about {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 48px;
  align-items: start;
}
.portrait-wrap { margin: 0; min-width: 0; }
.portrait-wrap img {
  display: block;
  width: 100%;
  height: 720px;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 24px;
  background: #ddd;
}
.portrait-wrap figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}
.about h2 { margin-bottom: 12px; }
.about .deck { font-size: 18px; max-width: 40rem; }
.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 28px;
  margin: 28px 0;
}
.facts dt {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.facts dd { margin: 0; }
.facts a { font-weight: 700; }
.about .tech {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.about .chips { margin-top: 10px; }
.tg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tg svg { width: 16px; height: 16px; flex: none; }
.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.trust li {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 700;
}

.strength-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
}
.card .num, .num {
  display: block;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #7a7464;
}
.card h3, .svc h3, .case h3, .step h3 { margin: 0 0 8px; font-size: 20px; letter-spacing: -0.03em; }
.card p, .svc p, .case p, .step p { margin: 0; color: #2c313b; }

.role {
  background: var(--dark);
  color: white;
  border-radius: 24px;
  padding: 36px;
  margin-bottom: 28px;
}
.role .kicker, .role p { color: rgba(255, 255, 255, 0.78); }
.role h2 { color: white; max-width: 18em; font-size: clamp(28px, 3vw, 40px); margin-bottom: 12px; }
.role-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 28px;
  align-items: end;
}
.role ul { margin: 18px 0; padding-left: 18px; }
.role li { margin: 6px 0; }
.section-lead { max-width: 44rem; margin: -12px 0 8px; color: var(--muted); }

.svc {
  display: grid;
  grid-template-columns: 56px 1.35fr 0.85fr 0.85fr;
  gap: 22px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.svc .label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.svc-foot { border-top: 1px solid var(--line); padding-top: 22px; }

.case {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.case-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.case-name {
  display: flex;
  align-items: center;
  gap: 10px;
}
.case-name img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex: none;
}
.case-role { font-weight: 800; margin-bottom: 8px !important; }
.case-when { color: var(--muted); font-size: 14px; font-weight: 700; }

.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
}
.tile {
  position: relative;
  overflow: hidden;
  border: 0;
  padding: 0;
  border-radius: 18px;
  background: #111;
  color: white;
  cursor: pointer;
  text-align: left;
  min-height: 240px;
}
.tile video, .tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}
.tile:hover video, .tile:hover img { transform: scale(1.04); }
.tile-humanoid { grid-column: span 7; min-height: 460px; }
.tile-unitree { grid-column: span 5; min-height: 460px; }
.tile-arms, .tile-sim { grid-column: span 6; min-height: 340px; }
.tile-counter, .tile-me { grid-column: span 6; min-height: 280px; }
.tile-shot {
  grid-column: span 6;
  min-height: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
}
.tile-shot img { height: auto; object-fit: contain; }
.tile-shot:hover img { transform: none; }
.tile-shot .cap {
  position: static;
  background: none;
  color: var(--ink);
  padding: 12px 14px 14px;
}
.cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 36px 16px 14px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  font-size: 14px;
  font-weight: 700;
}
.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}
.is-photo .badge { display: none; }

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.step { padding-top: 14px; border-top: 2px solid var(--ink); }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 16px 0 0; list-style: none; }
.chips li {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 700;
}
.plain { margin: 0; padding-left: 18px; }
.plain li { margin: 8px 0; }

.footer {
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 14px;
}
.footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

dialog {
  width: min(1000px, calc(100% - 28px));
  border: 0;
  padding: 0;
  background: #0e1014;
  color: white;
  border-radius: 18px;
}
dialog::backdrop { background: rgba(0, 0, 0, 0.72); }
.lightbox-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 12px 0;
}
dialog video, dialog img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  background: black;
}
#lightbox-caption { margin: 0; padding: 12px 16px 16px; font-size: 14px; }
dialog button {
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  border-radius: 999px;
  min-height: 36px;
  padding: 6px 12px;
  cursor: pointer;
}

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.hero :focus-visible, dialog :focus-visible { outline-color: var(--lime); }

@media (max-width: 980px) {
  .burger { display: flex; }
  .nav-panel {
    display: none;
    position: absolute;
    top: var(--header);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 8px 16px 18px;
    background: rgba(244, 243, 239, 0.98);
    border-bottom: 1px solid var(--line);
  }
  .nav-panel.open { display: flex; }
  .nav-panel a { padding: 12px 4px; font-size: 16px; }
  .nav-cta { text-align: center; }
  .about, .role-grid, .split, .strength-grid { grid-template-columns: 1fr; }
  .portrait-wrap img { height: 520px; }
  .svc { grid-template-columns: 40px 1fr; }
  .svc .who, .svc .out { grid-column: 2; }
  .stats, .steps { grid-template-columns: 1fr 1fr; }
  .tile-humanoid, .tile-unitree, .tile-arms, .tile-sim, .tile-counter, .tile-me, .tile-shot {
    grid-column: span 12;
    min-height: 280px;
  }
  .tile-shot { min-height: 0; }
  .tile-humanoid { min-height: 360px; }
  h1 { max-width: none; }
  .hero-shade {
    background: linear-gradient(180deg, rgba(8, 10, 14, 0.45) 0%, rgba(8, 10, 14, 0.88) 55%, rgba(8, 10, 14, 0.94) 100%);
  }
}

@media (max-width: 640px) {
  .wrap { width: min(var(--wrap), calc(100% - 28px)); }
  section { padding: 64px 0; }
  .facts, .stats, .steps { grid-template-columns: 1fr; }
  .role { padding: 18px; }
  .case-top { flex-direction: column; }
  .header { height: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile video, .tile img { transition: none; }
}
