/* =========================================================================
   ASTANA BIONICS — design system
   Brand colours live in :root. Replace --accent with the official brand
   yellow once supplied; everything else derives from these tokens.
   ========================================================================= */

:root {
  /* Palette */
  --bg: #0a0b0c;
  --bg-2: #0f1113;
  --surface: #15171a;
  --surface-2: #1c1f23;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.18);
  --text: #f2f2ee;
  --text-2: #b9bcc0;
  --muted: #7e8288;
  --accent: #fde402;          /* ASTANA BIONICS brand yellow (from the brand mark) */
  --accent-ink: #0a0b0c;

  /* Type */
  --font-display: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --fs-display: clamp(2.6rem, 6.4vw, 6.5rem);
  --fs-h1: clamp(2.4rem, 6vw, 5.5rem);
  --fs-h2: clamp(1.9rem, 4vw, 3.6rem);
  --fs-h3: clamp(1.25rem, 1.8vw, 1.6rem);
  --fs-lead: clamp(1.05rem, 1.35vw, 1.3rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-mono: 0.75rem;

  /* Layout */
  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1440px;
  --header-h: 84px;
  --section-y: clamp(88px, 11vw, 168px);
  --radius: 2px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --dur: 0.9s;
}

/* Longer Russian and Kazakh strings get a slightly tighter display scale */
html[lang="ru"],
html[lang="kk"] {
  --fs-display: clamp(2.2rem, 5.4vw, 5.5rem);
  --fs-h1: clamp(2.1rem, 5.2vw, 4.8rem);
  --fs-h2: clamp(1.7rem, 3.5vw, 3.2rem);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  overflow-wrap: break-word;
  hyphens: manual;
}

::selection { background: var(--accent); color: var(--accent-ink); }

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

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform 0.2s;
}
.skip-link:focus { transform: none; }

/* Avoid an English flash when a saved language is applied on load */
.i18n-wait body { opacity: 0; }
body { transition: opacity 0.25s; }

/* ---------- Page transitions ---------- */
@view-transition { navigation: auto; }

::view-transition-old(root) { animation: vt-out 0.28s var(--ease-io) both; }
::view-transition-new(root) { animation: vt-in 0.5s var(--ease) both; }
.site-header { view-transition-name: site-header; }

@keyframes vt-out { to { opacity: 0; transform: translateY(-10px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(14px); } }

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

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2vw, 32px);
}

.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: calc(var(--section-y) * 0.6); }
.section--line { border-top: 1px solid var(--line); }

/* ---------- Typography helpers ---------- */
.label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.label__idx { color: var(--accent); }
.label::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--accent);
}
.label--plain::before { display: none; }

.display { font-size: var(--fs-display); line-height: 0.94; letter-spacing: -0.045em; }
.h1 { font-size: var(--fs-h1); line-height: 0.98; letter-spacing: -0.04em; }
.h2 { font-size: var(--fs-h2); line-height: 1.02; }
.h3 { font-size: var(--fs-h3); line-height: 1.15; letter-spacing: -0.02em; }
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--text-2); max-width: 46ch; }
.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.mono { font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: 0.06em; text-transform: uppercase; }
.dim { color: var(--muted); }

/* ---------- Links & buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 0 22px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.005em;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
}
.btn--accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn--accent:hover { background: var(--text); border-color: var(--text); }
.btn--ghost:hover { border-color: var(--text); }

.arrow {
  width: 18px; height: 18px;
  flex: none;
  transition: transform 0.4s var(--ease);
}
.btn:hover .arrow,
.link-arrow:hover .arrow,
a:hover > .arrow,
.card-link:hover .arrow { transform: translateX(4px); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  padding-bottom: 6px;
  background: linear-gradient(var(--accent), var(--accent)) left bottom / 0 1px no-repeat,
              linear-gradient(var(--line-2), var(--line-2)) left bottom / 100% 1px no-repeat;
  transition: background-size 0.5s var(--ease);
}
.link-arrow:hover { background-size: 100% 1px, 100% 1px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  transition: transform 0.45s var(--ease), background-color 0.35s, border-color 0.35s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(10, 11, 12, 0.86);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-color: var(--line);
}
.site-header.is-hidden { transform: translateY(-100%); }

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  height: 100%;
  margin-right: auto;
  flex: none;
}
.brand img { height: 50px; width: auto; }
@media (max-width: 420px) { .brand img { height: 40px; } }
.brand__word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.brand:has(img) .brand__word { display: none; }

.nav__list { display: flex; gap: clamp(16px, 2.2vw, 36px); }
.nav__link {
  position: relative;
  display: inline-block;
  padding: 8px 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  transition: color 0.3s;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease);
}
.nav__link:hover { color: var(--text); }
.nav__link:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__link[aria-current="page"] { color: var(--text); }
.nav__link[aria-current="page"]::after { transform: scaleX(1); }

.lang {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 3px;
  flex: none;
}
.lang__btn {
  min-width: 38px;
  height: 30px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-radius: 1px;
  transition: color 0.25s, background-color 0.25s;
}
.lang__btn:hover { color: var(--text); }
.lang__btn[aria-pressed="true"] { background: var(--surface-2); color: var(--accent); }

.burger {
  display: none;
  width: 44px; height: 44px;
  position: relative;
  flex: none;
}
.burger span {
  position: absolute;
  left: 11px; right: 11px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.45s var(--ease), opacity 0.3s;
}
.burger span:nth-child(1) { top: 17px; }
.burger span:nth-child(2) { top: 26px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--bg);
  padding: calc(var(--header-h) + 24px) var(--gutter) 32px;
  display: flex;
  flex-direction: column;
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path 0.7s var(--ease-io), visibility 0s linear 0.7s;
}
.mobile-menu.is-open {
  clip-path: inset(0 0 0 0);
  visibility: visible;
  transition: clip-path 0.7s var(--ease-io), visibility 0s;
}
.mobile-menu__list { display: grid; gap: 2px; border-top: 1px solid var(--line); }
.mobile-menu__link {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 7vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease), color 0.25s;
}
.mobile-menu__link .mono { color: var(--muted); font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.06em; }
.mobile-menu__link[aria-current="page"] { color: var(--accent); }
.mobile-menu.is-open .mobile-menu__link { opacity: 1; transform: none; }
.mobile-menu.is-open li:nth-child(1) .mobile-menu__link { transition-delay: 0.18s; }
.mobile-menu.is-open li:nth-child(2) .mobile-menu__link { transition-delay: 0.23s; }
.mobile-menu.is-open li:nth-child(3) .mobile-menu__link { transition-delay: 0.28s; }
.mobile-menu.is-open li:nth-child(4) .mobile-menu__link { transition-delay: 0.33s; }
.mobile-menu.is-open li:nth-child(5) .mobile-menu__link { transition-delay: 0.38s; }
.mobile-menu.is-open li:nth-child(6) .mobile-menu__link { transition-delay: 0.43s; }
.mobile-menu__foot { margin-top: auto; padding-top: 32px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }

body.menu-open { overflow: hidden; }

@media (max-width: 1080px) {
  .nav { display: none; }
  .burger { display: inline-block; }
}
@media (max-width: 420px) {
  .header__inner .lang { display: none; }
}

/* ---------- Media slots ---------- */
.media {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  isolation: isolate;
}
.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease), opacity 0.8s var(--ease);
}
.media img.is-loading { opacity: 0; }

.media--ph {
  background-color: var(--surface);
  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;
}
.media--ph::before,
.media--ph::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border: 1px solid var(--line-2);
  z-index: 1;
}
.media--ph::before { top: 14px; left: 14px; border-right: 0; border-bottom: 0; }
.media--ph::after { bottom: 14px; right: 14px; border-left: 0; border-top: 0; }
.ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  background: radial-gradient(closest-side, var(--surface) 55%, transparent);
}
.ph__icon { width: 28px; height: 28px; color: var(--muted); }
.ph__label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  max-width: 28ch;
  line-height: 1.5;
}
.ph__label strong { display: block; color: var(--text-2); font-weight: 500; }

.media--shade::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(10, 11, 12, 0) 35%, rgba(10, 11, 12, 0.85) 100%);
  pointer-events: none;
}
/* Product cut-outs (transparent PNG/WebP): shown whole on a softly lit stage */
.media--product {
  background:
    radial-gradient(60% 50% at 50% 62%, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0) 72%),
    var(--surface);
}
.media--product img { object-fit: contain; padding: 9%; }
.media--bleed img { padding-bottom: 0; object-position: center bottom; }

.media--ph.media--shade::after { background: none; border: 0; width: 18px; height: 18px; inset: auto 14px 14px auto; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }

/* ---------- Status badges ---------- */
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 26px;
  padding: 0 10px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text);
  background: rgba(10, 11, 12, 0.72);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.status::before { content: ""; width: 7px; height: 7px; flex: none; }
.status--serial::before,
.status--components::before { background: var(--accent); }
.status--pilot::before { border: 1px solid var(--accent); }
.status--dev { color: var(--text-2); }
.status--dev::before { border: 1px dashed var(--text-2); border-radius: 50%; }

/* ---------- Reveal animations ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  transition-delay: calc(var(--d, 0) * 1ms);
}
.js .reveal.is-in { opacity: 1; transform: none; }

.js .reveal-media { clip-path: inset(100% 0 0 0); transition: clip-path 1.3s var(--ease-io); transition-delay: calc(var(--d, 0) * 1ms); }
.js .reveal-media img { transform: scale(1.12); transition: transform 1.8s var(--ease); }
.js .reveal-media.is-in { clip-path: inset(0 0 0 0); }
.js .reveal-media.is-in img { transform: none; }

/* Split headings: each word rises from a mask */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.16em; margin-bottom: -0.16em; }
.split .w > span { display: inline-block; }
.js .split .w > span {
  transform: translateY(105%);
  transition: transform 1s var(--ease);
  transition-delay: calc(var(--i, 0) * 45ms + var(--d, 0) * 1ms);
}
.js .split.is-in .w > span { transform: none; }

.accent-text { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-top: clamp(64px, 8vw, 112px);
  padding-bottom: 32px;
  background: var(--bg-2);
}
.footer__top { row-gap: 48px; }
.footer__brand { grid-column: 1 / 5; display: grid; gap: 28px; align-content: start; justify-items: start; }
.footer__mark { width: 88px; height: auto; }
.footer__claim { font-size: var(--fs-h3); font-family: var(--font-display); font-weight: 500; letter-spacing: -0.02em; line-height: 1.25; max-width: 22ch; }
.footer__col { grid-column: span 2; display: grid; gap: 14px; align-content: start; }
.footer__col:first-of-type { grid-column: 6 / span 2; }
.footer__col:has(.footer__contacts) { grid-column: 8 / span 3; }
.footer__col h2 { font-family: var(--font-mono); font-size: var(--fs-mono); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.footer__col a, .footer__col p { color: var(--text-2); font-size: var(--fs-small); transition: color 0.25s; }
.footer__col a:hover { color: var(--text); }
.footer__col .lang { justify-self: start; }
.footer__bottom {
  margin-top: clamp(64px, 8vw, 112px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: var(--fs-small);
}
.to-top { display: inline-flex; align-items: center; gap: 10px; color: var(--text-2); transition: color 0.25s; }
.to-top:hover { color: var(--accent); }
.to-top .arrow { transform: rotate(-90deg); }

@media (max-width: 900px) {
  .footer__brand { grid-column: 1 / -1; }
  .footer__col, .footer__col:first-of-type, .footer__col:has(.footer__contacts) { grid-column: span 6; }
}
@media (max-width: 480px) {
  .footer__col, .footer__col:first-of-type, .footer__col:has(.footer__contacts) { grid-column: 1 / -1; }
}

/* =========================================================================
   Shared page sections
   ========================================================================= */

/* Inner page hero */
.page-hero {
  padding-top: calc(var(--header-h) + clamp(72px, 10vw, 150px));
  padding-bottom: clamp(56px, 7vw, 104px);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.page-hero__crumb { display: flex; gap: 10px; align-items: center; color: var(--muted); margin-bottom: clamp(28px, 4vw, 48px); }
.page-hero__crumb a:hover { color: var(--text); }
.page-hero__label { grid-column: 1 / -1; margin-bottom: 28px; }
.page-hero__title { grid-column: 1 / 10; }
.page-hero__lead { grid-column: 1 / 7; margin-top: clamp(28px, 3vw, 40px); }
.page-hero__aside { grid-column: 9 / 13; align-self: end; justify-self: end; text-align: right; margin-top: 40px; }
@media (max-width: 900px) {
  .page-hero__title, .page-hero__lead, .page-hero__aside { grid-column: 1 / -1; }
  .page-hero__aside { justify-self: start; text-align: left; }
}

.section-head { row-gap: 24px; margin-bottom: clamp(48px, 6vw, 88px); align-items: end; }
.section-head__label { grid-column: 1 / 4; align-self: start; padding-top: 0.6em; }
.section-head__title { grid-column: 4 / 11; }
.section-head__text { grid-column: 4 / 10; margin-top: 8px; }
.section-head__link { grid-column: 11 / 13; justify-self: end; }
@media (max-width: 900px) {
  .section-head__label, .section-head__title, .section-head__text, .section-head__link { grid-column: 1 / -1; justify-self: start; }
}

/* Engineering frame lines in the background of some sections */
.frame-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.frame-lines .container { height: 100%; }
.frame-lines .grid { height: 100%; }
.frame-lines span { grid-column: span 3; border-left: 1px solid rgba(255, 255, 255, 0.035); }
.frame-lines span:last-child { border-right: 1px solid rgba(255, 255, 255, 0.035); }
@media (max-width: 700px) {
  .frame-lines span:nth-child(odd) { border-left-color: transparent; }
}

/* =========================================================================
   HOME
   ========================================================================= */
/* Content starts right under the header: no full-viewport stretching or vertical centring */
.hero {
  position: relative;
  padding-top: var(--header-h);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.hero__body {
  position: relative;
  z-index: 2;
  align-items: stretch;
  padding-block: clamp(28px, 4vh, 48px) clamp(32px, 5vh, 56px);
}
.hero__text { grid-column: 1 / 8; position: relative; z-index: 2; }
.hero__eyebrow { margin-bottom: clamp(24px, 4vh, 40px); }
.hero__title .line { display: block; }
.hero__title .line + .line { color: var(--muted); }
.hero__lead { margin-top: clamp(24px, 4vh, 40px); max-width: 44ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; margin-top: clamp(32px, 5vh, 52px); }

.hero__visual {
  grid-column: 8 / 13;
  position: relative;
  align-self: stretch;
  min-height: 420px;
}
.hero__media {
  position: absolute;
  inset: 0;
}
.hero__media img { will-change: transform; transform: scale(1.04); transition: opacity 0.8s var(--ease); }
/* The hero product fills the whole visual column, from its top edge down to the floor line */
.hero__media.media--product {
  inset: 0;
  background: radial-gradient(50% 45% at 50% 62%, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0) 72%);
}
.hero__media.media--product img { padding: 0; object-position: center bottom; }
.hero__visual::after {
  /* floor line the product stands on */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-2) 20%, var(--line-2) 80%, transparent);
}
.js .hero__media { animation: hero-in 1.6s var(--ease-io) 0.2s both; }
@keyframes hero-in { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }

.hero__ticks {
  position: absolute;
  z-index: 3;
  inset: auto 0 18px auto;
  display: grid;
  gap: 6px;
  justify-items: end;
  color: var(--text-2);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}
.hero__ruler {
  position: absolute;
  z-index: 3;
  left: -22px;
  bottom: 0;
  top: 0;
  width: 10px;
  background: repeating-linear-gradient(180deg, var(--line-2) 0 1px, transparent 1px 12px);
  pointer-events: none;
}
.hero__ruler::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 1px;
  top: var(--scan, 0%);
  background: var(--accent);
  transition: top 0.2s linear;
}

.hero__strip {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line);
  background: rgba(10, 11, 12, 0.7);
}
.hero__strip ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hero__strip li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 20px 22px 0;
  font-size: var(--fs-small);
  color: var(--text-2);
}
.hero__strip li + li { padding-left: 20px; border-left: 1px solid var(--line); }
.hero__strip .mono { color: var(--accent); }

@media (max-width: 1080px) {
  .hero__text { grid-column: 1 / -1; }
  .hero__visual { grid-column: 1 / -1; min-height: 0; aspect-ratio: 4 / 3; margin-top: 48px; }
  .hero__media, .hero__media.media--product { inset: 0; height: auto; border-left: 0; }
  .hero__ruler { left: 0; }
}
@media (max-width: 760px) {
  .hero__strip ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__strip li:nth-child(3) { padding-left: 0; border-left: 0; }
  .hero__strip li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .hero__visual { aspect-ratio: 1 / 1; }
  .hero__ticks { display: none; }
}

/* Technology statement */
.statement { grid-column: 4 / 13; }
.statement__text {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 3.25rem);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.03em;
}
.statement__text .sw { transition: color 0.4s; }
.js .statement__text .sw { color: #3a3d42; }
.js .statement__text .sw.on { color: var(--text); }
.statement__foot { margin-top: clamp(40px, 5vw, 64px); max-width: 52ch; }
@media (max-width: 900px) { .statement { grid-column: 1 / -1; } }

/* Directions rows */
.rows { border-top: 1px solid var(--line); }
.row {
  position: relative;
  display: grid;
  grid-template-columns: 80px minmax(0, 4fr) minmax(0, 5fr) auto 28px;
  gap: 24px;
  align-items: center;
  padding: clamp(24px, 3vw, 36px) 0;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.4s, padding 0.5s var(--ease);
}
.row::before {
  content: "";
  position: absolute;
  left: 0; top: -1px;
  height: 1px; width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease);
}
.row:hover::before, .row:focus-visible::before { transform: scaleX(1); }
.row:hover { padding-left: 12px; }
.row__idx { color: var(--accent); }
.row__title { font-family: var(--font-display); font-size: clamp(1.3rem, 2.2vw, 2rem); font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; }
.row__desc { color: var(--text-2); font-size: 0.975rem; max-width: 52ch; }
.row .arrow { color: var(--muted); transition: transform 0.4s var(--ease), color 0.3s; }
.row:hover .arrow { color: var(--accent); transform: translateX(4px); }
@media (max-width: 900px) {
  .row { grid-template-columns: 48px minmax(0, 1fr) 24px; row-gap: 10px; }
  .row__desc, .row__status { grid-column: 2 / 3; }
  .row .arrow { grid-row: 1; grid-column: 3; }
  .row:hover { padding-left: 0; }
}

/* Product highlight */
.highlight { row-gap: clamp(16px, 2vw, 32px); }
.pcard { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); }
.pcard::before {
  content: "";
  position: absolute;
  z-index: 3;
  left: -1px; top: -1px;
  height: 2px; width: calc(100% + 2px);
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease);
}
.pcard:hover::before, .pcard:focus-within::before { transform: scaleX(1); }
.pcard .media { flex: 1; min-height: 240px; }
.pcard:hover .media img { transform: scale(1.04); }
.pcard__body { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 22px 24px 24px; border-top: 1px solid var(--line); }
.pcard__name { font-family: var(--font-display); font-size: clamp(1.6rem, 2.6vw, 2.5rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1; }
.pcard__cat { margin-top: 8px; color: var(--muted); font-size: var(--fs-small); }
.pcard .status { position: absolute; z-index: 2; top: 16px; left: 16px; }
.pcard .arrow { color: var(--muted); }
.pcard:hover .arrow { color: var(--accent); }
.card-link::after { content: ""; position: absolute; inset: 0; z-index: 4; }

.highlight__main { grid-column: 1 / 8; grid-row: span 2; }
.highlight__main .media { min-height: clamp(360px, 46vw, 640px); }
.highlight__side { grid-column: 8 / 13; }
@media (max-width: 900px) {
  .highlight__main, .highlight__side { grid-column: 1 / -1; grid-row: auto; }
  .highlight__main .media { min-height: 0; aspect-ratio: 4 / 3; flex: none; }
  .highlight__side .media { min-height: 0; aspect-ratio: 16 / 10; flex: none; }
}

/* Manufacturing: sticky media + steps */
.mfg { align-items: start; row-gap: 56px; }
.mfg__media { grid-column: 1 / 7; position: sticky; top: calc(var(--header-h) + 24px); aspect-ratio: 1 / 1; }
.mfg__content { grid-column: 8 / 13; }
.mfg__content .h2 { margin-top: 24px; }
.mfg__content .lead { margin-top: 28px; }
.steps { margin-top: clamp(40px, 5vw, 72px); border-top: 1px solid var(--line); counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  transition: color 0.5s;
}
.step__n { font-family: var(--font-mono); font-size: var(--fs-mono); padding-top: 6px; transition: color 0.5s; }
.step__t { font-family: var(--font-display); font-size: clamp(1.25rem, 1.8vw, 1.6rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.step__d { margin-top: 8px; font-size: 0.95rem; }
.step.is-active { color: var(--text); }
.step.is-active .step__n { color: var(--accent); }
.step.is-active .step__d { color: var(--text-2); }
@media (max-width: 900px) {
  .mfg__media { grid-column: 1 / -1; position: relative; top: 0; aspect-ratio: 4 / 3; }
  .mfg__content { grid-column: 1 / -1; }
}

/* R&D band */
.band { position: relative; min-height: clamp(560px, 80vh, 820px); display: flex; align-items: flex-end; overflow: hidden; }
.band__media { position: absolute; inset: 0; }
.band__media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(10, 11, 12, 0.92) 0%, rgba(10, 11, 12, 0.6) 45%, rgba(10, 11, 12, 0.15) 100%),
              linear-gradient(0deg, rgba(10, 11, 12, 0.9) 0%, rgba(10, 11, 12, 0) 45%);
  pointer-events: none;
}
.band__media.media--ph::before { background: radial-gradient(ellipse at 20% 100%, rgba(10, 11, 12, 0.9), transparent 70%); border: 0; width: auto; height: auto; inset: 0; }
.band__inner { position: relative; z-index: 2; width: 100%; padding-block: clamp(64px, 8vw, 120px); }
.band__text { grid-column: 1 / 7; }
.band__text .h2 { margin-top: 24px; }
.band__text .lead { margin-top: 24px; color: var(--text-2); }
.band__text .status { margin-top: 32px; }
.band__text .link-arrow { margin-top: 40px; }
.band__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 32px; margin-top: 36px; }
.band__actions .status, .band__actions .link-arrow { margin-top: 0; }
/* R&D band with a product cut-out: object on the right, text on the left */
.band__media.media--product {
  left: 48%;
  background: radial-gradient(50% 48% at 50% 72%, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 72%);
}
.band__media.media--product::before { display: none; }
.band__media.media--product img { padding: 10% 6% 0; }
.band:has(.media--product) .band__text { grid-column: 1 / 6; }
.band:has(.media--product) { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

@media (max-width: 900px) {
  .band__text, .band:has(.media--product) .band__text { grid-column: 1 / -1; }
  .band:has(.media--product) { flex-direction: column; align-items: stretch; }
  .band__media.media--product { position: relative; inset: auto; left: 0; height: clamp(300px, 80vw, 460px); }
  .band:has(.media--product) .band__inner { padding-top: 24px; }
}

/* About teaser */
.teaser { row-gap: 32px; align-items: center; }
.teaser__title { grid-column: 1 / 7; }
.teaser__body { grid-column: 8 / 13; display: grid; gap: 32px; justify-items: start; }
.teaser__coords { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: clamp(48px, 6vw, 88px); padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); }
@media (max-width: 900px) { .teaser__title, .teaser__body { grid-column: 1 / -1; } }

/* =========================================================================
   PROSTHETICS
   ========================================================================= */
.cats { row-gap: clamp(40px, 5vw, 72px); }
.cat { grid-column: span 6; position: relative; display: flex; flex-direction: column; }
.cat:nth-child(even) { margin-top: clamp(0px, 8vw, 120px); }
.cat .media { aspect-ratio: 1 / 1; border: 1px solid var(--line); }
.cat:hover .media img { transform: scale(1.04); }
.cat__top { position: absolute; z-index: 2; top: 16px; left: 16px; right: 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; pointer-events: none; }
.cat__idx { font-family: var(--font-mono); font-size: var(--fs-mono); color: var(--text-2); background: rgba(10, 11, 12, 0.72); padding: 4px 8px; }
.cat__body { padding-top: 28px; display: grid; gap: 14px; position: relative; }
.cat__body::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  height: 2px; width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s var(--ease);
}
.cat:hover .cat__body::before, .cat:focus-within .cat__body::before { transform: scaleX(1); }
.cat__title { font-size: clamp(1.6rem, 2.6vw, 2.4rem); letter-spacing: -0.035em; }
.cat__desc { color: var(--text-2); max-width: 48ch; }
.cat__note { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: var(--fs-small); }
.cat__note::before { content: ""; width: 14px; height: 1px; background: var(--muted); flex: none; }
@media (max-width: 760px) {
  .cat { grid-column: 1 / -1; }
  .cat:nth-child(even) { margin-top: 0; }
  .cat .media { aspect-ratio: 4 / 3; }
}

/* Anatomy explainer */
.anatomy { align-items: center; row-gap: 48px; }
.anatomy__visual { grid-column: 1 / 6; display: grid; gap: 10px; padding: clamp(24px, 3vw, 40px); border: 1px solid var(--line); background: var(--bg-2); position: relative; }
.anatomy__visual::before { content: ""; position: absolute; left: 50%; top: 24px; bottom: 24px; width: 1px; background: var(--line-2); }
.part-block {
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: border-color 0.4s, color 0.4s, background-color 0.4s;
}
.part-block[data-part="socket"] { height: 120px; margin-inline: 12%; }
.part-block[data-part="knee"] { height: 64px; margin-inline: 26%; }
.part-block[data-part="pylon"] { height: 150px; margin-inline: 42%; }
.part-block[data-part="foot"] { height: 56px; margin-inline: 18% 6%; }
.part-block span { white-space: nowrap; font-size: 0.62rem; }
.part-btn__t { display: block; }
.part-block.is-active { border-color: var(--accent); color: var(--accent); background: rgba(253, 228, 2, 0.06); }
.anatomy__list { grid-column: 7 / 13; }
.part-btn {
  width: 100%;
  display: grid;
  grid-template-columns: 48px 1fr 20px;
  gap: 16px;
  align-items: start;
  text-align: left;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  transition: color 0.35s;
}
.anatomy__list li:first-child .part-btn { border-top: 1px solid var(--line); }
.part-btn .mono { padding-top: 6px; }
.part-btn__t { font-family: var(--font-display); font-size: clamp(1.2rem, 1.7vw, 1.5rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.part-btn__d { display: block; margin-top: 0; max-height: 0; overflow: hidden; opacity: 0; font-family: var(--font-body); font-size: 0.95rem; font-weight: 400; letter-spacing: 0; color: var(--text-2); transition: max-height 0.6s var(--ease), opacity 0.5s, margin 0.5s var(--ease); }
.part-btn__plus { position: relative; width: 14px; height: 14px; margin-top: 8px; }
.part-btn__plus::before, .part-btn__plus::after { content: ""; position: absolute; left: 0; top: 50%; width: 14px; height: 1px; background: currentColor; transition: transform 0.4s var(--ease); }
.part-btn__plus::after { transform: rotate(90deg); }
.part-btn:hover { color: var(--text); }
.part-btn[aria-expanded="true"] { color: var(--text); }
.part-btn[aria-expanded="true"] .mono { color: var(--accent); }
.part-btn[aria-expanded="true"] .part-btn__d { max-height: 12em; opacity: 1; margin-top: 10px; }
.part-btn[aria-expanded="true"] .part-btn__plus::after { transform: rotate(0); }
@media (max-width: 900px) {
  .anatomy__visual, .anatomy__list { grid-column: 1 / -1; }
  .anatomy__visual { max-width: 460px; }
}

.notice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  background: var(--bg-2);
}
.notice p { color: var(--text-2); max-width: 80ch; }
@media (max-width: 640px) { .notice { grid-template-columns: 1fr; gap: 12px; } }

/* =========================================================================
   SERVICES
   ========================================================================= */
.bento { row-gap: clamp(16px, 2vw, 32px); }
.svc { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.svc .media { aspect-ratio: 16 / 10; }
.svc:hover .media img { transform: scale(1.04); }
.svc__body { display: grid; gap: 14px; padding: clamp(22px, 2.4vw, 32px); align-content: start; flex: 1; position: relative; }
.svc__body::before {
  content: "";
  position: absolute;
  left: 0; top: -1px;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s var(--ease);
}
.svc:hover .svc__body::before { transform: scaleX(1); }
.svc__idx { color: var(--accent); }
.svc__title { font-size: clamp(1.35rem, 2vw, 1.9rem); letter-spacing: -0.03em; line-height: 1.08; }
.svc__desc { color: var(--text-2); font-size: 0.975rem; max-width: 52ch; }

.svc:nth-child(1) { grid-column: span 7; }
.svc:nth-child(2) { grid-column: span 5; }
.svc:nth-child(3), .svc:nth-child(4), .svc:nth-child(5) { grid-column: span 4; }
.svc:nth-child(1) .media { aspect-ratio: 16 / 9; }
.svc:nth-child(2) .media { aspect-ratio: auto; flex: 1; min-height: 220px; }
.svc:nth-child(2) .svc__body { flex: none; }
.svc:nth-child(6) { grid-column: 1 / -1; flex-direction: row; }
.svc:nth-child(6) .media { flex: 0 0 50%; aspect-ratio: 16 / 8; }
.svc:nth-child(6) .svc__body { align-content: center; }
.svc:nth-child(6) .svc__body::before { width: 2px; height: 100%; top: 0; left: -1px; transform: scaleY(0); transform-origin: top; }
.svc:nth-child(6):hover .svc__body::before { transform: scaleY(1); }
@media (max-width: 1000px) {
  .svc:nth-child(n) { grid-column: span 6; }
  .svc:nth-child(6) { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  .svc:nth-child(n) { grid-column: 1 / -1; }
  .svc:nth-child(6) { flex-direction: column; }
  .svc:nth-child(6) .media { flex: none; aspect-ratio: 16 / 10; }
  .svc:nth-child(2) .media { flex: none; aspect-ratio: 16 / 10; min-height: 0; }
}

.process { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2vw, 32px); padding-top: 40px; }
.process__line { position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--line-2); }
.process__line::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 2.2s var(--ease-io); }
.process.is-in .process__line::after { transform: scaleX(1); }
.process__item { position: relative; display: grid; gap: 12px; align-content: start; }
.process__item::before { content: ""; position: absolute; top: -45px; left: 0; width: 9px; height: 9px; background: var(--bg); border: 1px solid var(--line-2); transition: background-color 0.4s, border-color 0.4s; transition-delay: calc(var(--n) * 450ms); }
.process.is-in .process__item::before { background: var(--accent); border-color: var(--accent); }
.process__n { color: var(--accent); }
.process__t { font-size: clamp(1.25rem, 1.8vw, 1.6rem); letter-spacing: -0.025em; }
.process__d { color: var(--text-2); font-size: 0.95rem; }
@media (max-width: 800px) {
  .process { grid-template-columns: 1fr 1fr; row-gap: 56px; }
  .process__line { display: none; }
  .process__item { padding-top: 24px; border-top: 1px solid var(--line-2); }
  .process__item::before { top: -5px; }
}
@media (max-width: 480px) { .process { grid-template-columns: 1fr; } }

/* =========================================================================
   PRODUCTS
   ========================================================================= */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(32px, 4vw, 56px); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: var(--fs-small);
  color: var(--text-2);
  transition: border-color 0.3s, color 0.3s, background-color 0.3s;
}
.chip:hover { border-color: var(--line-2); color: var(--text); }
.chip[aria-pressed="true"] { border-color: var(--accent); color: var(--text); background: rgba(253, 228, 2, 0.08); }
.chip__count { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); }

.catalog { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 32px); }
.prod { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); transition: opacity 0.4s, transform 0.5s var(--ease); scroll-margin-top: calc(var(--header-h) + 24px); }
.prod[hidden] { display: none; }
.prod::before {
  content: "";
  position: absolute;
  z-index: 3;
  left: -1px; top: -1px;
  height: 2px; width: calc(100% + 2px);
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease);
}
.prod:hover::before, .prod:target::before { transform: scaleX(1); }
.prod .media { aspect-ratio: 1 / 1; }
.prod:hover .media img { transform: scale(1.05); }
.prod .status { position: absolute; z-index: 2; top: 14px; left: 14px; }
.prod__body { display: grid; gap: 10px; padding: 22px 24px 26px; border-top: 1px solid var(--line); flex: 1; align-content: start; }
.prod__cat { color: var(--muted); }
.prod__name { font-size: clamp(1.5rem, 2.2vw, 2.1rem); letter-spacing: -0.035em; line-height: 1.02; }
.prod__desc { color: var(--text-2); font-size: 0.95rem; }
.prod__origin { margin-top: 6px; color: var(--muted); }
.prod--wide { grid-column: span 2; }
.prod--wide .media { aspect-ratio: auto; flex: 1; min-height: 320px; }
@media (max-width: 1000px) { .catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  .catalog { grid-template-columns: 1fr; }
  .prod--wide { grid-column: auto; }
  .prod--wide .media { aspect-ratio: 1 / 1; flex: none; min-height: 0; }
}
.js .prod.is-filtering { opacity: 0; transform: translateY(12px); }

.cta-strip { align-items: center; row-gap: 24px; padding: clamp(32px, 4vw, 56px); border: 1px solid var(--line); background: var(--bg-2); }
.prod-note { margin-top: clamp(32px, 4vw, 56px); padding-top: 20px; border-top: 1px solid var(--line); max-width: 90ch; color: var(--muted); font-size: var(--fs-small); }
.cta-strip__t { grid-column: 1 / 8; font-family: var(--font-display); font-weight: 500; font-size: clamp(1.4rem, 2.4vw, 2.2rem); letter-spacing: -0.03em; line-height: 1.1; }
.cta-strip__a { grid-column: 9 / 13; justify-self: end; }
@media (max-width: 900px) { .cta-strip__t, .cta-strip__a { grid-column: 1 / -1; justify-self: start; } }

/* =========================================================================
   NEWS
   ========================================================================= */
.news { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 32px); }
.ncard { display: flex; flex-direction: column; border-top: 1px solid var(--line-2); padding-top: 20px; gap: 16px; }
.ncard .media { aspect-ratio: 3 / 2; }
.ncard__meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.ncard__title { font-size: clamp(1.2rem, 1.6vw, 1.45rem); letter-spacing: -0.02em; line-height: 1.2; }
.ncard__text { color: var(--text-2); font-size: 0.95rem; }
.ncard__demo { color: var(--accent); }
@media (max-width: 1000px) { .news { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .news { grid-template-columns: 1fr; } }

.empty {
  position: relative;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 16px;
  min-height: 380px;
  padding: 48px 24px;
  border: 1px solid var(--line);
  background-color: var(--bg-2);
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center;
}
.empty__inner { display: grid; gap: 16px; justify-items: center; padding: 32px; background: radial-gradient(closest-side, var(--bg-2) 60%, transparent); }
.empty__title { font-size: var(--fs-h3); letter-spacing: -0.02em; }
.empty__text { color: var(--text-2); max-width: 44ch; }

/* =========================================================================
   ABOUT
   ========================================================================= */
.about { align-items: start; }
.toc { grid-column: 1 / 4; position: sticky; top: calc(var(--header-h) + 32px); padding-top: var(--section-y); }
.toc ol { display: grid; gap: 2px; border-left: 1px solid var(--line); }
.toc a {
  display: flex;
  gap: 12px;
  padding: 9px 0 9px 18px;
  margin-left: -1px;
  border-left: 1px solid transparent;
  font-size: var(--fs-small);
  color: var(--muted);
  transition: color 0.3s, border-color 0.3s;
}
.toc a .mono { font-size: 0.68rem; padding-top: 2px; }
.toc a:hover { color: var(--text); }
.toc a.is-active { color: var(--text); border-left-color: var(--accent); }
.toc a.is-active .mono { color: var(--accent); }
.about__content { grid-column: 4 / 13; }
.about__content > section { padding-block: var(--section-y); border-bottom: 1px solid var(--line); }
.about__content > section:last-child { border-bottom: 0; }
.about__content .h2 { margin-top: 24px; max-width: 18ch; }
.prose { display: grid; gap: 20px; margin-top: 36px; max-width: 64ch; color: var(--text-2); font-size: 1.05rem; }
.prose strong { color: var(--text); font-weight: 600; }
@media (max-width: 1000px) {
  .toc { display: none; }
  .about__content { grid-column: 1 / -1; }
}

.mission {
  margin-top: 36px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.8vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.18;
  max-width: 28ch;
}
.mission::before { content: ""; display: block; width: 40px; height: 2px; background: var(--accent); margin-bottom: 28px; }

.values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 56px; background: var(--line); border: 1px solid var(--line); }
.value { background: var(--bg); padding: clamp(24px, 3vw, 36px); display: grid; gap: 12px; align-content: start; transition: background-color 0.4s; }
.value:hover { background: var(--bg-2); }
.value__t { font-size: clamp(1.2rem, 1.6vw, 1.4rem); letter-spacing: -0.02em; }
.value__d { color: var(--text-2); font-size: 0.95rem; }
@media (max-width: 640px) { .values { grid-template-columns: 1fr; } }

.goals { margin-top: 56px; }
.goals__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.goals li { display: grid; grid-template-columns: 48px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); color: var(--text-2); }
.goals li .mono { color: var(--accent); padding-top: 4px; }

.relation { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin-top: 48px; }
.relation__node { padding: 22px 24px; border: 1px solid var(--line-2); display: grid; gap: 6px; }
.relation__node strong { font-family: var(--font-display); font-size: 1.15rem; letter-spacing: 0.02em; }
.relation__node span { color: var(--muted); font-size: var(--fs-small); }
.relation__node--a { border-color: var(--accent); }
.relation__link { width: clamp(40px, 8vw, 120px); height: 1px; background: repeating-linear-gradient(90deg, var(--accent) 0 6px, transparent 6px 12px); }
@media (max-width: 640px) {
  .relation { grid-template-columns: 1fr; }
  .relation__link { width: 1px; height: 32px; justify-self: center; background: repeating-linear-gradient(180deg, var(--accent) 0 6px, transparent 6px 12px); }
}

.gallery { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(12px, 1.5vw, 20px); margin-top: 48px; }
.gallery figure { display: grid; gap: 10px; }
.gallery figcaption { color: var(--muted); }
/* Three portrait workshop photos: one tall on the left, two stacked on the right */
.gallery figure:nth-child(1) { grid-column: 1 / span 3; grid-row: span 2; grid-template-rows: 1fr auto; }
.gallery figure:nth-child(1) .media { height: 100%; min-height: 320px; }
.gallery figure:nth-child(2), .gallery figure:nth-child(3) { grid-column: 4 / span 3; }
.gallery figure:nth-child(2) .media, .gallery figure:nth-child(3) .media { aspect-ratio: 4 / 3; }
@media (max-width: 640px) {
  .gallery figure:nth-child(n) { grid-column: 1 / -1; grid-row: auto; }
  .gallery figure:nth-child(1) .media { height: auto; min-height: 0; aspect-ratio: 4 / 5; }
}

.ip { margin-top: 40px; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.ip__item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 22px 24px; background: var(--bg); }
.ip__item .mono { color: var(--muted); }
.ip__empty { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; padding: clamp(24px, 3vw, 36px); background: var(--bg-2); }
.ip__empty svg { width: 32px; height: 32px; color: var(--accent); }
.ip__empty p { color: var(--text-2); max-width: 60ch; }
.ip__empty .mono { display: block; margin-bottom: 8px; color: var(--muted); }

.contacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 48px; background: var(--line); border: 1px solid var(--line); }
.contact { background: var(--bg); padding: clamp(24px, 3vw, 40px); display: grid; gap: 14px; align-content: start; }
.contact dt { color: var(--muted); }
.contact dd { font-family: var(--font-display); font-size: clamp(1.2rem, 1.9vw, 1.75rem); font-weight: 500; letter-spacing: -0.025em; line-height: 1.15; overflow-wrap: anywhere; }
.contact dd a { background: linear-gradient(var(--accent), var(--accent)) left bottom / 0 1px no-repeat; transition: background-size 0.5s var(--ease); }
.contact dd a:hover { background-size: 100% 1px; }
.contact dd.is-pending { color: var(--muted); font-size: clamp(1.05rem, 1.5vw, 1.3rem); }
@media (max-width: 640px) { .contacts { grid-template-columns: 1fr; } }

/* Social icons (footer and About contacts) */
.social { display: flex; flex-wrap: wrap; gap: 8px; }
.social__link,
.contact dd .social__link {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  color: var(--text-2);
  background: none;
  transition: color 0.25s, border-color 0.25s, background-color 0.25s;
}
.social__link svg { width: 18px; height: 18px; }
.social__link:hover,
.contact dd .social__link:hover { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.contact__social .social { gap: 10px; }
.contact__social .social__link { width: 48px; height: 48px; }
.contact__social .social__link svg { width: 20px; height: 20px; }

/* Footer contact column */
.footer__contacts { display: grid; gap: 10px; justify-items: start; }
.footer__col .fc__line { color: var(--text); white-space: nowrap; }
.footer__col .fc__line:hover { color: var(--accent); }
.footer__contacts .social { margin-top: 8px; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  .js .reveal, .js .split .w > span, .js .reveal-media, .js .reveal-media img { opacity: 1; transform: none; clip-path: none; }
  .js .statement__text .sw { color: var(--text); }
  @view-transition { navigation: none; }
}

/* Mobile menu contact block */
.mobile-menu__contact { display: grid; gap: 6px; }
.mobile-menu__contact a { color: var(--text); font-size: var(--fs-small); }
.mobile-menu__contact a:hover { color: var(--accent); }

/* Product cut-outs with wide transparent margins: fill the frame height, crop only empty sides */
.media--cover img { object-fit: cover; object-position: center bottom; padding: 6% 0 0; }
.band__media.media--cover img { padding: 22% 0 0; }

/* Manufacturing photo: no backdrop, the cut-out sits directly on the page */
.mfg__media.media--product { background: none; }

/* "What a leg prosthesis is made of": stacked part photos instead of schematic boxes */
.anatomy__visual { gap: 4px; padding: clamp(20px, 3vw, 36px) clamp(16px, 2.5vw, 28px); }
.anatomy__visual::before { left: calc(50% + 40px); }
.part-block,
.part-block[data-part] {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  align-items: center;
  place-items: center start;
  height: auto;
  margin: 0;
  border: 0;
  background: none;
  cursor: pointer;
  position: relative;
  z-index: 1;
}
.part-block span {
  justify-self: start;
  font-size: 0.64rem;
  color: var(--muted);
  transition: color 0.35s;
}
.part-block .media,
.part-block .media.media--product { width: 100%; height: var(--part-h); background: none; }
.part-block .media img { padding: 0; opacity: 0.5; filter: grayscale(0.6) brightness(0.9); transition: opacity 0.45s var(--ease), filter 0.45s var(--ease), transform 0.6s var(--ease); }
.part-block:hover .media img { opacity: 0.75; }
.part-block.is-active { border: 0; background: none; color: inherit; }
.part-block.is-active span { color: var(--accent); }
.part-block.is-active .media img { opacity: 1; filter: none; }

/* One straight axis: every part is shifted so its attachment points sit on the centre line.
   Images are height-limited, so a part's rendered width = height x aspect ratio.
   Offsets come from measured attachment points (fraction of image width):
   socket bottom .485, knee top .528 / bottom .556, pylon .501, foot adapter .638 */
.anatomy__visual {
  --h-socket: clamp(120px, 15vw, 170px);
  --h-knee: clamp(130px, 16vw, 185px);
  --h-pylon: clamp(150px, 19vw, 220px);
  --h-foot: clamp(90px, 11vw, 130px);
}
.part-block[data-part="socket"] { --part-h: var(--h-socket); }
.part-block[data-part="knee"]   { --part-h: var(--h-knee); }
.part-block[data-part="pylon"]  { --part-h: var(--h-pylon); }
.part-block[data-part="foot"]   { --part-h: var(--h-foot); }
/* knee: bottom (.556) on the axis; aspect .667 */
.part-block[data-part="knee"] .media img { object-position: calc(50% - var(--h-knee) * 0.0374) center; }
/* socket: bottom (.485, aspect .8) meets the knee top, which sits at -0.0187 x knee height */
.part-block[data-part="socket"] .media img { object-position: calc(50% + var(--h-socket) * 0.012 - var(--h-knee) * 0.0187) center; }
/* pylon is centred in its file */
.part-block[data-part="pylon"] .media img { object-position: 50% center; }
/* foot: pyramid adapter (.638, aspect 1.413) on the axis */
.part-block[data-part="foot"] .media img { object-position: calc(50% - var(--h-foot) * 0.195) center; }

/* =========================================================================
   DOCUMENTS: patent and licences (About page)
   ========================================================================= */

.docs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 32px); }
.doc {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(22px, 2.4vw, 32px);
  background: var(--surface);
  border: 1px solid var(--line);
}
.doc::before {
  content: "";
  position: absolute;
  left: -1px; top: -1px;
  width: calc(100% + 2px); height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease);
}
.doc:hover::before, .doc:focus-within::before { transform: scaleX(1); }
.doc__top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.doc__icon { width: 28px; height: 28px; color: var(--accent); flex: none; }
.doc__kind { color: var(--muted); font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.doc__num { font-family: var(--font-display); font-size: clamp(1.6rem, 2.4vw, 2.2rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.doc__title { font-size: clamp(1.15rem, 1.5vw, 1.35rem); letter-spacing: -0.02em; line-height: 1.2; }
.doc__meta { color: var(--text-2); font-size: 0.92rem; flex: 1; }
.doc__open { align-self: flex-start; margin-top: 12px; }
.docs-note { margin-top: 20px; max-width: 90ch; color: var(--muted); font-size: var(--fs-small); }

@media (max-width: 1000px) { .docs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  .docs { grid-template-columns: 1fr; }
}
.docs--about { margin-top: 40px; }
