:root {
  --text: #111111;
  --muted: #5f6368;
  --line: #d9d9d9;
  --soft: #f7f7f4;
  --accent: #21c063;
  --accent-dark: #128343;
  --code: #101214;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #ffffff;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
}

.nav {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid var(--text);
  border-radius: 50%;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.brand-logo {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid var(--text);
  border-radius: 50%;
  background: #fff;
  overflow: hidden;
}

.brand-logo img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.nav-links a:hover {
  color: var(--text);
}

.language-switch {
  position: relative;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.language-switch summary {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 0;
  font-size: 18px;
  line-height: 1;
  white-space: nowrap;
}

.language-switch summary > span[aria-hidden="true"] {
  font-size: .78em;
  font-weight: 900;
  letter-spacing: 0;
}

.language-switch summary::-webkit-details-marker {
  display: none;
}

.language-switch summary::after {
  content: none;
}

.language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: grid;
  min-width: 190px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .12);
  padding: 6px;
}

.language-menu a {
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--muted);
}

.language-menu a > span {
  display: inline-grid;
  min-width: 20px;
  place-items: center;
  font-weight: 900;
}

.language-menu a:hover,
.language-menu a[aria-current="page"] {
  background: var(--soft);
  color: var(--text);
}

.btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--text);
  border-radius: 999px;
  padding: 0 18px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.btn-rust {
  border-color: var(--accent);
  background: var(--accent);
  color: #062311;
}

.btn-rust:hover {
  background: #39d978;
}

.hero {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(420px, .72fr);
  gap: 52px;
  align-items: center;
  min-height: min(760px, calc(100vh - 68px));
  padding: 54px 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 900;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 680px;
  margin-bottom: 20px;
  font-size: clamp(48px, 6.6vw, 84px);
  line-height: .94;
  letter-spacing: 0;
}

.mark {
  color: var(--accent-dark);
}

h1 .mark,
h2 .mark {
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  background: linear-gradient(180deg, transparent 62%, rgba(33, 192, 99, .18) 0);
}

.lead .mark {
  color: #333f36;
  font-weight: 800;
}

h2 {
  max-width: 860px;
  margin-bottom: 20px;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.02;
  letter-spacing: 0;
  text-wrap: balance;
  overflow-wrap: normal;
  hyphens: none;
}

h3 {
  margin-bottom: 10px;
  font-size: 22px;
  line-height: 1.16;
}

.lead {
  max-width: 600px;
  color: var(--muted);
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.48;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.proof-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 48px;
  border: 1px solid var(--line);
}

.proof {
  min-height: 110px;
  padding: 20px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.proof:last-child {
  border-right: 0;
}

.proof strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 18px;
}

.machine-console {
  border: 1px solid var(--text);
  border-radius: 18px;
  background: var(--soft);
  padding: 18px;
}

.console-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.console-route {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.console-route div {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 13px 14px;
}

.console-route small {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.console-route strong {
  font-size: 17px;
}

.console-route span {
  width: 2px;
  height: 12px;
  margin-left: 22px;
  background: var(--accent);
}

.mini-code,
.code {
  overflow: auto;
  border-radius: 14px;
  background: var(--code);
  color: #d7ffe5;
  padding: 16px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
}

.compact-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.compact-proof span {
  flex: 1 1 130px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 9px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.board-rack {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.board-rack img {
  height: 112px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  object-fit: contain;
}

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

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

.split {
  display: grid;
  grid-template-columns: .78fr 1.22fr;
  gap: 58px;
  align-items: start;
}

.split h2,
.api-grid h2,
.rfq h2 {
  max-width: 640px;
  font-size: clamp(32px, 3.4vw, 50px);
  line-height: 1.06;
}

.position-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  background: #fff;
}

.position-panel > div {
  padding: 26px;
  border-right: 1px solid var(--line);
}

.position-panel > div:last-child {
  border-right: 0;
}

.position-panel ul {
  display: grid;
  gap: 13px;
  margin: 18px 0 0;
  padding: 0;
  color: var(--muted);
  list-style: none;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 36px;
}

.card,
.scenario-card,
.api-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.card {
  display: flex;
  flex-direction: column;
}

.card figure {
  margin: 0;
  padding: 20px;
  border-bottom: 1px solid var(--line);
  background: #fafafa;
}

.card figure img {
  height: 150px;
  width: 100%;
  object-fit: contain;
}

.card-body,
.scenario-card,
.api-card {
  padding: 24px;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.card p,
.scenario-card p,
.api-card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.coverage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 34px;
}

.coverage-card {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 18px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 18px;
}

.coverage-card img {
  width: 86px;
  height: 86px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafafa;
  object-fit: contain;
  padding: 10px;
}

.coverage-status {
  display: inline-flex;
  margin-bottom: 10px;
  border-radius: 999px;
  background: rgba(33, 192, 99, .12);
  padding: 5px 9px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
}

.coverage-card h3 {
  margin-bottom: 8px;
  font-size: 19px;
}

.coverage-card p {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.coverage-card strong {
  color: var(--text);
  font-size: 13px;
}

.board-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 34px;
}

.board-photo-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.board-photo-card figure {
  display: grid;
  aspect-ratio: 1.72;
  place-items: center;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.board-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
}

.board-photo-card div {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.board-photo-card span {
  align-self: flex-start;
  margin-bottom: 12px;
  border-radius: 999px;
  background: rgba(33, 192, 99, .12);
  padding: 6px 10px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.board-photo-card h3 {
  margin-bottom: 9px;
  font-size: 20px;
  line-height: 1.2;
}

.board-photo-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.flow {
  display: grid;
  gap: 12px;
  counter-reset: flow;
}

.flow-item {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 20px;
}

.flow-item::before {
  counter-increment: flow;
  content: counter(flow);
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  font-weight: 900;
}

.flow-item p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 36px;
}

.api-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
  gap: 28px;
  align-items: stretch;
}

.code-stack {
  display: grid;
  gap: 16px;
  height: 100%;
}

.code-stack .code {
  height: 100%;
  min-height: 0;
  margin: 0;
}

.code-secondary {
  background: #16331f;
}

.api-cards {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 34px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 24px;
}

.faq-item p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.rfq {
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  gap: 40px;
}

form {
  display: grid;
  gap: 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 13px 14px;
  color: var(--text);
  font: inherit;
}

textarea {
  min-height: 132px;
  resize: vertical;
}

.optional-fields {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafafa;
  padding: 0;
}

.optional-fields summary {
  cursor: pointer;
  padding: 13px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.optional-fields .form-row {
  padding: 0 14px 14px;
}

.optional-fields .form-row:first-of-type {
  padding-top: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: .68;
}

.form-hint,
.form-status {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.form-status {
  min-height: 20px;
  font-weight: 800;
}

.form-status[data-type="success"] {
  color: var(--accent-dark);
}

.form-status[data-type="error"] {
  color: #b42318;
}

.form-status[data-type="loading"] {
  color: var(--muted);
}

.footer {
  background: #fff;
  color: var(--muted);
  padding: 52px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 28px;
}

.footer h2 {
  margin-bottom: 14px;
  color: var(--text);
  font-size: 13px;
}

.footer p,
.footer li {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.footer ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.copyright {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: #8a8f94;
  font-size: 13px;
  text-align: center;
}

@media (max-width: 940px) {
  .nav-links {
    display: none;
  }

  .hero-grid,
  .split,
  .api-grid,
  .rfq {
    grid-template-columns: 1fr;
  }

  .cards,
  .coverage-grid,
  .board-gallery,
  .scenario-grid,
  .faq-grid,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 28px, 1120px);
  }

  .nav {
    min-height: 62px;
    gap: 10px;
  }

  .brand {
    font-size: 18px;
  }

  .brand-logo {
    width: 32px;
    height: 32px;
  }

  .brand-logo img {
    width: 26px;
    height: 26px;
  }

  .language-switch summary {
    width: 36px;
    height: 36px;
    font-size: 17px;
  }

  .language-menu {
    right: -74px;
  }

  .nav > .btn {
    min-height: 38px;
    padding: 0 12px;
    font-size: 13px;
  }

  .hero-grid {
    gap: 24px;
    min-height: auto;
    padding: 32px 0 36px;
  }

  h1 {
    margin-bottom: 14px;
    font-size: 42px;
    line-height: .98;
  }

  .eyebrow {
    margin-bottom: 10px;
    font-size: 12px;
  }

  .lead {
    font-size: 17px;
    line-height: 1.42;
  }

  .hero-actions {
    margin-top: 18px;
  }

  .machine-console {
    border-radius: 14px;
    padding: 12px;
  }

  .console-head {
    padding-bottom: 10px;
    font-size: 11px;
  }

  .console-route {
    gap: 6px;
    margin: 10px 0 0;
  }

  .console-route div {
    padding: 10px 12px;
  }

  .console-route strong {
    font-size: 15px;
  }

  .console-route span {
    height: 8px;
  }

  .hero .mini-code,
  .hero .compact-proof {
    display: none;
  }

  h2,
  .split h2,
  .api-grid h2,
  .rfq h2 {
    font-size: 38px;
    line-height: 1.08;
  }

  .code-stack {
    height: auto;
  }

  .code-stack .code {
    height: auto;
  }

  .section {
    padding: 68px 0;
  }

  .proof-row,
  .position-panel,
  .cards,
  .coverage-grid,
  .board-gallery,
  .scenario-grid,
  .faq-grid,
  .form-row,
  .footer-grid,
  .board-rack {
    grid-template-columns: 1fr;
  }

  .coverage-card {
    grid-template-columns: 72px 1fr;
  }

  .coverage-card img {
    width: 72px;
    height: 72px;
  }

  .proof,
  .position-panel > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .proof:last-child,
  .position-panel > div:last-child {
    border-bottom: 0;
  }
}
