:root {
  /* Нейтральная институциональная палитра: одна акцентная краска, остальное — серые одного семейства */
  --paper: #ffffff;
  --paper-alt: #f2f5f6;
  --paper-deep: #e9eef0;
  --white: #ffffff;
  --ink: #111a1f;
  --ink-soft: #3b4c55;
  --muted: #63757e;
  --line: #dbe1e4;
  --line-strong: #c3ccd1;
  --accent: #14496b;
  --accent-dark: #0e3550;
  --accent-soft: #eaf0f5;
  --graphite: #101a20;
  --graphite-deep: #0a1216;

  --shadow-sm: 0 1px 2px rgba(17, 26, 31, 0.06);
  --shadow-md: 0 10px 30px rgba(17, 26, 31, 0.09);

  --radius: 4px;
  --radius-lg: 6px;

  --container: 1180px;
  --gutter: max(20px, calc((100vw - var(--container)) / 2));
  --measure: 68ch;

  --section-y: 112px;
  --section-y-end: 124px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

p,
li,
dd {
  line-height: 1.7;
}

p {
  text-wrap: pretty;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 40;
  padding: 10px 14px;
  color: var(--white);
  background: var(--accent-dark);
  border-radius: var(--radius);
  transform: translateY(-140%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------- Шапка ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 14px var(--gutter);
  color: var(--white);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition:
    background 200ms ease,
    color 200ms ease,
    border-color 200ms ease;
}

.site-header.is-scrolled {
  color: var(--ink);
  background: var(--paper);
  border-bottom-color: var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  padding: 4px;
  background: var(--white);
  border-radius: var(--radius);
}

.brand span {
  display: grid;
  gap: 2px;
}

.brand strong {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
}

.brand small {
  color: rgba(255, 255, 255, 0.66);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 200ms ease;
}

.site-header.is-scrolled .brand small {
  color: var(--muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-nav a {
  padding: 9px 12px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius);
  transition:
    color 160ms ease,
    background 160ms ease;
}

.site-nav a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.site-header.is-scrolled .site-nav a {
  color: var(--ink-soft);
}

.site-header.is-scrolled .site-nav a:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

/* ---------- Типографика ---------- */

h1,
h2,
h3 {
  margin: 0;
  font-family: "IBM Plex Serif", Georgia, serif;
  font-weight: 600;
  text-wrap: balance;
}

h1 {
  max-width: 18ch;
  font-size: clamp(2.5rem, 1.55rem + 3vw, 3.9rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
}

h2 {
  max-width: 22ch;
  font-size: clamp(1.85rem, 1.35rem + 1.6vw, 2.5rem);
  line-height: 1.16;
  letter-spacing: -0.015em;
}

h3 {
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.22rem;
  font-weight: 600;
  line-height: 1.34;
  letter-spacing: -0.005em;
}

.eyebrow,
.section-label {
  margin: 0 0 20px;
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-label {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.hero .eyebrow {
  color: rgba(255, 255, 255, 0.62);
}

/* ---------- Герой ---------- */

.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 86dvh;
  padding: 150px var(--gutter) 34px;
  color: var(--white);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(10, 18, 22, 0.4), rgba(10, 18, 22, 0.86)),
    linear-gradient(120deg, #16242c 0%, #101a20 58%, #0c141a 100%);
}

.hero::after {
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  content: "";
  background: var(--accent);
}

.hero__content {
  width: min(920px, 100%);
  min-width: 0;
  padding-bottom: 196px;
}

/* Без этого грид-трек раздувается под самое длинное слово ("электростимуляции")
   и текст уезжает за край на узких экранах */
.intro-grid > *,
.science-layout > *,
.roadmap-layout > *,
.support-section > *,
.section-heading > *,
.mode-detail > *,
.mode-cards > *,
.evidence-list article > * {
  min-width: 0;
}

.hero__lead {
  max-width: 62ch;
  margin: 26px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.12rem;
  font-weight: 400;
  line-height: 1.62;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 20px;
  font-size: 0.94rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 120ms ease;
}

.button span {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  opacity: 0.75;
}

.button:active {
  transform: translateY(1px);
}

.button--primary {
  color: var(--white);
  background: var(--accent);
  border: 1px solid var(--accent);
}

.button--primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.button--secondary {
  color: var(--white);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.34);
}

.button--secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.55);
}

.hero__panel {
  position: absolute;
  right: var(--gutter);
  bottom: 36px;
  display: grid;
  grid-template-columns: repeat(2, minmax(190px, 1fr));
  width: min(520px, calc(100% - 40px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
}

.hero__panel article {
  min-height: 122px;
  padding: 18px;
}

.hero__panel article + article {
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.hero__panel span,
.hero__panel small {
  display: block;
  color: rgba(255, 255, 255, 0.56);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero__panel strong {
  display: block;
  margin: 12px 0 8px;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.32;
}

/* ---------- Секции ---------- */

section:not(.hero) {
  padding: var(--section-y) var(--gutter) var(--section-y-end);
}

.intro-section {
  background: var(--paper);
}

.intro-grid,
.science-layout,
.roadmap-layout,
.support-section {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 64px;
  align-items: start;
}

.intro-copy p,
.section-heading p,
.science-copy p,
.support-copy p {
  max-width: var(--measure);
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.intro-copy p + p,
.science-copy p + p,
.support-copy p + p {
  margin-top: 18px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 40px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.metrics div {
  min-height: 132px;
  padding: 22px;
  background: var(--paper);
}

.metrics div + div {
  border-left: 1px solid var(--line);
}

.metrics dt {
  margin-bottom: 12px;
  color: var(--accent);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.metrics dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.modes-section {
  background: var(--paper-alt);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.72fr);
  gap: 52px;
  align-items: end;
  margin-bottom: 40px;
}

/* ---------- Режимы ---------- */

.mode-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
}

.mode-tab {
  min-height: 44px;
  padding: 11px 18px;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  transition:
    color 160ms ease,
    background 160ms ease;
}

.mode-tab + .mode-tab {
  border-left: 1px solid var(--line-strong);
}

.mode-tab:hover {
  background: var(--accent-soft);
}

.mode-tab.is-active {
  color: var(--white);
  background: var(--accent);
}

.mode-detail {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(360px, 1.14fr);
  gap: 20px;
  align-items: stretch;
  margin-top: 20px;
}

.mode-detail__text {
  min-height: 440px;
  padding: 36px;
  color: var(--white);
  border-radius: var(--radius);
  background: var(--graphite);
}

.mode-detail__text .eyebrow {
  color: rgba(255, 255, 255, 0.6);
}

.mode-detail__text h3 {
  font-family: "IBM Plex Serif", Georgia, serif;
  font-size: 1.85rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.mode-detail__text p {
  max-width: 52ch;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.76);
}

.check-list {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 26px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.96rem;
}

.check-list li::before {
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 12px;
  height: 1px;
  content: "";
  background: rgba(255, 255, 255, 0.5);
}

.mode-detail__media {
  position: relative;
  min-height: 440px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.mode-detail__media img {
  width: 100%;
  height: 100%;
  min-height: 440px;
  object-fit: cover;
}

.mode-detail__media figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 18px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.5;
  background: rgba(10, 18, 22, 0.82);
}

.mode-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.mode-card {
  position: relative;
  min-height: 236px;
  padding: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.mode-card::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  content: "";
  background: var(--accent);
  opacity: 0;
  transition: opacity 180ms ease;
}

.mode-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.mode-card:hover::after {
  opacity: 1;
}

.mode-card__number {
  display: inline-block;
  margin-bottom: 26px;
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
}

.mode-card p {
  max-width: 52ch;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

/* ---------- Публикация ---------- */

.science-section {
  color: var(--white);
  background: var(--graphite-deep);
}

.science-section .section-label,
.science-section .eyebrow {
  color: rgba(255, 255, 255, 0.6);
  border-bottom-color: rgba(255, 255, 255, 0.16);
}

.science-copy p {
  color: rgba(255, 255, 255, 0.76);
}

.evidence-list {
  display: grid;
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
}

.evidence-list article {
  display: grid;
  grid-template-columns: 122px minmax(0, 1fr);
  gap: 18px;
  padding: 22px;
}

.evidence-list article + article {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.evidence-list strong {
  color: var(--white);
  font-size: 0.82rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.evidence-list span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.96rem;
  line-height: 1.6;
}

/* ---------- Прототип ---------- */

.prototype-section {
  background: var(--paper);
}

.prototype-gallery {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 0.9fr;
  grid-auto-rows: 260px;
  gap: 14px;
}

.gallery-item {
  position: relative;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--graphite);
}

.gallery-item--large {
  grid-row: span 2;
}

/* Шестой кадр иначе повисает один в последнем ряду — растягиваем на всю ширину */
.gallery-item:last-child {
  grid-column: 1 / -1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}

.gallery-item:hover img {
  transform: scale(1.02);
}

.gallery-item figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 14px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.45;
  background: rgba(10, 18, 22, 0.82);
}

/* ---------- Дорожная карта ---------- */

.roadmap-section {
  background: var(--paper-alt);
}

.roadmap-layout {
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
}

.roadmap-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.roadmap-list li {
  display: grid;
  grid-template-columns: 54px minmax(0, 0.72fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  min-height: 110px;
  padding: 24px;
}

.roadmap-list li + li {
  border-top: 1px solid var(--line);
}

.roadmap-list span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--accent);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
}

.roadmap-list strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.roadmap-list p {
  max-width: 56ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

/* ---------- Поддержка и подвал ---------- */

.support-section {
  align-items: center;
  color: var(--white);
  background: var(--graphite);
}

.support-copy .eyebrow {
  color: rgba(255, 255, 255, 0.6);
}

.support-copy p {
  color: rgba(255, 255, 255, 0.75);
}

.support-media {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
}

.support-media img {
  width: 100%;
  aspect-ratio: 1.36;
  object-fit: cover;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 36px;
  align-items: center;
  padding: 36px var(--gutter);
  color: rgba(255, 255, 255, 0.66);
  background: var(--graphite-deep);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer div {
  display: flex;
  align-items: center;
  gap: 14px;
}

.site-footer img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  padding: 5px;
  background: var(--white);
  border-radius: var(--radius);
}

.site-footer p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.6;
}

.site-footer div p {
  color: rgba(255, 255, 255, 0.86);
}

/* ---------- Адаптив ---------- */

@media (max-width: 980px) {
  :root {
    --section-y: 84px;
    --section-y-end: 92px;
  }

  .site-header {
    align-items: center;
  }

  .site-nav {
    display: none;
  }

  .hero {
    min-height: 88dvh;
    padding-top: 128px;
  }

  .hero__content {
    padding-bottom: 180px;
  }

  .hero__panel {
    left: 20px;
    right: 20px;
    bottom: 28px;
    width: auto;
  }

  .intro-grid,
  .science-layout,
  .roadmap-layout,
  .support-section,
  .section-heading,
  .mode-detail,
  .site-footer {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  h1,
  h2 {
    max-width: 24ch;
  }

  .mode-detail__text,
  .mode-detail__media,
  .mode-detail__media img {
    min-height: 360px;
  }

  .prototype-gallery {
    grid-template-columns: 1fr 1fr;
  }

  .gallery-item--large {
    grid-column: span 2;
  }

  .roadmap-list li {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .roadmap-list p {
    grid-column: 2;
  }
}

@media (max-width: 680px) {
  :root {
    --section-y: 64px;
    --section-y-end: 72px;
  }

  .site-header {
    padding: 10px 18px;
  }

  .brand img {
    width: 36px;
    height: 36px;
  }

  .brand strong {
    font-size: 0.82rem;
  }

  .brand small {
    font-size: 0.64rem;
  }

  .hero {
    min-height: 92dvh;
    padding-inline: 18px;
  }

  .hero__content {
    padding-bottom: 210px;
  }

  .hero__lead {
    font-size: 1rem;
  }

  h1 {
    max-width: none;
    font-size: 2rem;
    line-height: 1.14;
  }

  h2 {
    max-width: none;
  }

  section:not(.hero) {
    padding-inline: 18px;
  }

  .hero__actions,
  .button {
    width: 100%;
  }

  .hero__panel,
  .mode-cards,
  .metrics,
  .mode-tabs,
  .prototype-gallery,
  .evidence-list article {
    grid-template-columns: 1fr;
  }

  .hero__panel article {
    min-height: auto;
    padding: 14px;
  }

  .hero__panel article + article {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    border-left: 0;
  }

  .metrics div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .mode-tabs {
    display: grid;
    width: 100%;
  }

  .mode-tab + .mode-tab {
    border-top: 1px solid var(--line-strong);
    border-left: 0;
  }

  .mode-detail__text {
    padding: 24px;
  }

  .mode-detail__text h3 {
    font-size: 1.45rem;
  }

  .evidence-list article {
    gap: 8px;
  }

  .prototype-gallery {
    grid-auto-rows: 300px;
  }

  .gallery-item--large,
  .gallery-item:last-child {
    grid-column: auto;
    grid-row: auto;
  }

  .roadmap-list li {
    grid-template-columns: 1fr;
  }

  .roadmap-list p {
    grid-column: auto;
  }

  .site-footer div {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
