:root {
  --bg: #fafbfc;
  --text: #0b1220;
  --muted: #5b6472;
  --accent: #0b4dff;
  --accent-dark: #0839c4;
  --border: #e5e8ef;
  --alt: #f1f4f9;
  --dark: #0b1220;
  --dark-2: #141c2e;
  --card: #ffffff;
  --radius: 10px;
  --max: 1120px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }

/* NAV */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: rgba(250,251,252,.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s;
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav__inner {
  max-width: var(--max); margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: flex-end;
}
.nav__links { display: flex; gap: 28px; align-items: center; font-size: .95rem; }
.nav__links a { color: var(--muted); }
.nav__links a:hover { color: var(--text); }
.nav__cta {
  color: #fff !important;
  background: var(--accent);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
}
.nav__cta:hover { background: var(--accent-dark); color: #fff !important; }
.lang-switch {
  display: flex;
  align-items: center;
  background: var(--alt);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.lang-switch__item {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--muted) !important;
  transition: background .2s, color .2s, box-shadow .2s;
}
.lang-switch__item:hover { color: var(--text) !important; }
.lang-switch__item.is-active {
  background: #ffffff;
  color: var(--text) !important;
  box-shadow: 0 1px 3px rgba(11,18,32,.15);
}
.lang-switch__item.is-active:hover { color: var(--text) !important; }
.nav__toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.nav__toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; }

/* HERO */
.hero {
  padding: 132px 24px 64px;
  max-width: var(--max);
  margin: 0 auto;
}
.hero__byline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
}
.hero__photo {
  width: 40px; height: 40px; border-radius: 50%; overflow: hidden;
  flex-shrink: 0;
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero__who { display: flex; flex-direction: column; line-height: 1.25; }
.hero__who strong { font-size: .92rem; }
.hero__who span { color: var(--muted); font-size: .82rem; }
.hero__title {
  font-size: clamp(2.15rem, 4.1vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  max-width: 820px;
  margin-bottom: 22px;
}
.hero__title span { color: var(--accent); }
.hero__lead {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 600px;
  margin-bottom: 30px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 48px; }

.hero__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 0;
  padding: 26px 0;
}
.stat {
  padding: 0 24px;
  border-left: 1px solid var(--border);
}
.stat:first-child { padding-left: 0; border-left: none; }
.stat dt {
  font-variant-numeric: tabular-nums;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
  margin: 0 0 6px;
}
.stat dd {
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.4;
  margin: 0;
}
@media (max-width: 720px) {
  .hero__stats { grid-template-columns: 1fr 1fr; row-gap: 22px; }
  .stat:nth-child(2n+1) { border-left: none; }
  .stat:nth-child(-n+2) { padding-top: 0; }
}

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: .95rem;
  border: none;
  cursor: pointer;
  transition: transform .15s, background .15s, border-color .15s;
}
.btn--primary {
  background: var(--accent); color: #fff;
}
.btn--primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--ghost-light {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,.25);
  color: #fff;
}
.btn--ghost-light:hover { border-color: #fff; }

/* SECTIONS */
.section { padding: 88px 24px; }
.section--alt { background: var(--alt); }
.section--dark { background: var(--dark); color: #fff; }
.section__inner { max-width: var(--max); margin: 0 auto; }
.section__label {
  color: var(--accent);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.section--dark .section__label { color: #7eb0ff; }
.section__head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 12px;
  max-width: 640px;
}
.section__sub {
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 36px;
}
.section--dark .section__sub { color: #a8b3c7; }

/* SIM DEMO (анимация блок-схема → изометрический цех) */
.sim-demo__stage {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  width: 95%;
  margin: 0 auto;
}
.sim-demo__canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1320 / 980;
  overflow: hidden;
  border-radius: 8px;
}
#simCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.sim-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: transform .7s cubic-bezier(.22,.8,.2,1), opacity .5s ease;
  z-index: 2;
  white-space: nowrap;
}
.sim-demo__stage.started .sim-btn {
  transform: translate(calc(-50% - 300px), -50%) scale(.82);
  opacity: .85;
}
.sim-demo__stage.started .sim-btn.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(calc(-50% - 300px), -50%) scale(.75);
}
/* выше специфичность, чем у .btn--primary:hover, чтобы hover не сбивал центрирование */
.sim-demo__stage .sim-btn:hover {
  transform: translate(-50%, -50%) scale(1.03);
}
.sim-demo__stage.started .sim-btn:hover {
  transform: translate(calc(-50% - 300px), -50%) scale(.85);
}
.sim-demo__stage.started .sim-btn.is-hidden:hover {
  opacity: 0;
  transform: translate(calc(-50% - 300px), -50%) scale(.75);
}
@media (max-width: 640px) {
  .sim-demo__stage.started .sim-btn {
    transform: translate(-50%, calc(-50% - 210px)) scale(.82);
  }
  .sim-demo__stage.started .sim-btn:hover {
    transform: translate(-50%, calc(-50% - 210px)) scale(.85);
  }
  .sim-demo__stage.started .sim-btn.is-hidden,
  .sim-demo__stage.started .sim-btn.is-hidden:hover {
    transform: translate(-50%, calc(-50% - 210px)) scale(.75);
  }
}

/* CASES */
.cases {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.case {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform .2s, box-shadow .2s;
}
.case:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px -24px rgba(11,18,32,.35);
}
.case--featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 12px 28px;
  background: linear-gradient(135deg, #fff 60%, #eef3ff 100%);
}
.case--featured h3 { grid-column: 1; font-size: 1.45rem; }
.case--featured .case__result { grid-column: 1; }
.case--featured > p:not(.case__result) { grid-column: 1; color: var(--muted); }
.case--featured .case__facts { grid-column: 2; grid-row: 1 / span 4; align-self: center; }
.case--featured .case__more { grid-column: 1; }
.case__tag {
  color: var(--accent);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.case h3 { font-size: 1.15rem; }
.case__result {
  color: var(--accent);
  font-weight: 750;
  font-size: 1.05rem;
}
.case > p { color: var(--muted); font-size: .96rem; }
.case__facts {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: .92rem;
  color: var(--muted);
}
.case__facts strong { color: var(--text); }
.case__more {
  margin-top: auto;
  align-self: flex-start;
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  font-size: .95rem;
}
.case__more:hover { text-decoration: underline; }

/* STACK */

.stack {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stack__col {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 18px;
}
.stack__col h3 {
  font-size: .95rem;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}
.stack__col li {
  color: var(--muted);
  font-size: .92rem;
  padding: 5px 0;
}

/* EXPERIENCE */
.experience__grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 64px;
  align-items: start;
}
.experience__side {
  border-left: 1px solid var(--border);
  padding-left: 40px;
}
@media (max-width: 900px) {
  .experience__grid { grid-template-columns: 1fr; }
  .experience__side {
    border-left: none;
    padding-left: 0;
    padding-top: 32px;
    border-top: 1px solid var(--border);
  }
}

/* TIMELINE */
.timeline {
  border-left: 2px solid var(--border);
  padding-left: 28px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.timeline__item { position: relative; }
.timeline__item::before {
  content: "";
  position: absolute;
  left: -34px; top: 6px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px #fff;
}
.timeline__date {
  color: var(--accent);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .04em;
  margin-bottom: 6px;
}
.timeline__body h3 { font-size: 1.05rem; margin-bottom: 6px; }
.timeline__body p { color: var(--muted); max-width: 640px; }

.edu-label {
  color: var(--muted);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.timeline--edu {
  gap: 18px;
  padding-left: 22px;
}
.timeline--edu .timeline__item::before { left: -28px; width: 8px; height: 8px; }
.timeline--edu .timeline__date { font-size: .76rem; margin-bottom: 4px; }
.timeline--edu .timeline__body h3 { font-size: .95rem; margin-bottom: 4px; }
.timeline--edu .timeline__body p { font-size: .88rem; }

/* LOGOS */
.logos { margin-top: 56px; }
.logos__label {
  color: var(--muted);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.logos__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px 40px;
}
.logos__row .logo-box {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.logos__row img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(1) opacity(.55);
  transition: filter .2s;
}
.logos__row .logo-box:hover img { filter: grayscale(0) opacity(1); }

/* CONTACT */
.contact__inner { text-align: center; }
.contact h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.5rem);
  margin: 0 auto 14px;
  max-width: 720px;
}
.contact__sub {
  color: #a8b3c7;
  max-width: 480px;
  margin: 0 auto 28px;
}
.contact__links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}
.footer__copy { color: #7a869c; font-size: .85rem; }

/* MODAL */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  visibility: hidden; opacity: 0;
  transition: opacity .25s, visibility .25s;
}
.modal.open { visibility: visible; opacity: 1; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(8,12,22,.55); }
.modal__panel {
  position: relative;
  background: #fff;
  border-radius: 16px;
  max-width: 560px;
  width: 100%;
  padding: 32px;
  transform: translateY(10px);
  transition: transform .25s;
}
.modal.open .modal__panel { transform: translateY(0); }
.modal__close {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px; border-radius: 50%;
  border: none; background: var(--alt); cursor: pointer;
}
.modal__tag {
  color: var(--accent);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.modal__text h3 { font-size: 1.3rem; margin-bottom: 16px; }
.modal__text p { color: var(--muted); margin-bottom: 10px; }
.modal__text strong { color: var(--text); }

/* RESPONSIVE */
@media (max-width: 900px) {
  .hero__grid,
  .stack,
  .cases { grid-template-columns: 1fr; }
  .case--featured {
    grid-template-columns: 1fr;
  }
  .case--featured .case__facts,
  .case--featured h3,
  .case--featured .case__result,
  .case--featured > p,
  .case--featured .case__more { grid-column: 1; grid-row: auto; }
}
@media (max-width: 720px) {
  .nav__toggle { display: flex; }
  .nav__links {
    position: fixed; top: 58px; left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-160%);
    transition: transform .25s;
  }
  .nav__links.open { transform: translateY(0); }
  .hero { padding-top: 100px; }
  .hero__stats { grid-template-columns: 1fr 1fr; }
  .section { padding: 64px 20px; }
}
