:root {
  --paper: #fbf4e8;
  --paper-soft: #f3eadb;
  --ink: #101211;
  --muted: #50534d;
  --red: #e64f33;
  --blue: #2d63d8;
  --lime: #d7f85d;
  --green: #2fa77a;
  --gold: #d2ac49;
  --app-bg: #0b1211;
  --app-panel: #101a18;
  --app-text: #fff4dc;
  --app-line: rgba(255, 246, 225, 0.15);
  --font-ui: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --container: 1420px;
  --page-pad: clamp(22px, 3vw, 42px);
  --rule: 3px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  max-width: 100%;
  overflow-x: clip;
  scroll-behavior: smooth;
  width: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
  width: 100%;
  color: var(--ink);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.5;
  background:
    linear-gradient(90deg, rgba(16, 18, 17, 0.052) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(rgba(16, 18, 17, 0.032) 1px, transparent 1px) 0 0 / 72px 72px,
    var(--paper);
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 100;
  transform: translateY(-140%);
  background: var(--ink);
  color: var(--paper);
  padding: 10px 14px;
  font-weight: 800;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 244, 232, 0.94);
  backdrop-filter: blur(14px);
}

.top-rule {
  height: 7px;
  background: var(--ink);
}

.header-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) auto;
  min-height: 72px;
  border-bottom: var(--rule) solid var(--ink);
}

.brand {
  display: flex;
  align-items: center;
  padding: 0 32px;
  border-right: var(--rule) solid var(--ink);
  font-size: 28px;
  font-weight: 950;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.4vw, 34px);
  padding: 0 30px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.nav a {
  text-decoration: none;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 26px;
  border-left: var(--rule) solid var(--ink);
}

.lang-toggle {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  border: 2px solid var(--ink);
  background: var(--paper);
}

.lang-toggle button {
  width: 42px;
  height: 34px;
  border: 0;
  border-right: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.lang-toggle button:last-child {
  border-right: 0;
}

.lang-toggle button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

.header-cta,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: var(--rule) solid var(--ink);
  padding: 0 18px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.header-cta {
  background: var(--red);
  color: var(--paper);
}

.btn:hover,
.header-cta:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--ink);
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(350px, 480px) minmax(0, 1fr);
  gap: clamp(28px, 3vw, 46px);
  max-width: var(--container);
  margin: 0 auto;
  padding: 44px var(--page-pad);
}

.hero {
  align-items: stretch;
  min-height: 652px;
  padding-top: 44px;
  padding-bottom: 44px;
}

.hero-copy {
  position: relative;
  min-height: 520px;
  padding: 6px 18px 0 10px;
  border-bottom: 4px solid var(--ink);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  background: var(--red);
  color: var(--paper);
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

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

h1 {
  max-width: 10.8ch;
  margin: 24px 0 22px;
  font-family: var(--font-serif);
  font-size: clamp(4.1rem, 6vw, 5.9rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.88;
  font-variation-settings: "SOFT" 35, "WONK" 1;
}

.lede {
  max-width: 400px;
  margin-bottom: 28px;
  color: #30332e;
  font-size: 18.5px;
  line-height: 1.47;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}

.btn-secondary {
  background: var(--paper);
  color: var(--ink);
}

.product-shell {
  align-self: start;
  min-width: 0;
  max-width: 100%;
  border: 4px solid var(--ink);
  background: var(--app-bg);
  color: var(--app-text);
  box-shadow: 12px 12px 0 var(--red);
  overflow: hidden;
  position: relative;
  font-family: var(--font-ui);
}

.product-shell::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 14px;
  background: var(--red);
}

.product-top {
  display: grid;
  grid-template-columns: 188px 1fr 202px;
  min-height: 52px;
  border-bottom: 2px solid var(--app-line);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.product-top span {
  display: flex;
  align-items: center;
  min-width: 0;
  border-right: 2px solid var(--app-line);
  padding: 0 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-top span:last-child {
  justify-content: flex-end;
  border-right: 0;
  color: var(--lime);
  padding-right: 28px;
}

.product-body {
  display: grid;
  grid-template-columns: 204px minmax(520px, 1fr) 280px;
  max-width: 100%;
  min-width: 0;
  min-height: 488px;
}

.app-side {
  border-right: 2px solid var(--app-line);
  padding: 20px 16px;
  background: rgba(255, 244, 220, 0.02);
}

.app-side-title {
  margin-bottom: 12px;
  color: rgba(255, 244, 220, 0.48);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.app-side-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 39px;
  border-bottom: 1px solid rgba(255, 244, 220, 0.12);
  color: rgba(255, 244, 220, 0.72);
  font-size: 13px;
  font-weight: 650;
  gap: 10px;
}

.app-side-item.active {
  color: var(--app-text);
  border-bottom-color: rgba(215, 248, 93, 0.52);
}

.app-side-item b {
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.app-main {
  padding: 22px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.app-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.app-title-row h2 {
  margin: 0;
  font-size: clamp(25px, 2.05vw, 32px);
  line-height: 1.02;
  letter-spacing: 0;
}

.app-title-row span {
  max-width: 150px;
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.32;
  text-transform: uppercase;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.kpi {
  min-height: 72px;
  border: 1px solid rgba(255, 244, 220, 0.18);
  background: rgba(255, 244, 220, 0.03);
  padding: 12px;
}

.kpi small {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 244, 220, 0.48);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.kpi strong {
  display: block;
  font-size: 26px;
  line-height: 1;
}

.flow-map {
  position: relative;
  height: 188px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 244, 220, 0.14);
  background:
    radial-gradient(circle at 46% 52%, rgba(47, 167, 122, 0.12), transparent 180px),
    rgba(255, 244, 220, 0.02);
  overflow: hidden;
}

.flow-map svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.node {
  position: absolute;
  width: 118px;
  border: 1px solid rgba(255, 244, 220, 0.22);
  background: rgba(11, 18, 17, 0.95);
  padding: 10px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.32);
}

.node.hot {
  border-color: rgba(215, 248, 93, 0.82);
  box-shadow: 0 0 28px rgba(215, 248, 93, 0.12);
}

.node small {
  color: rgba(255, 244, 220, 0.46);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.node strong {
  display: block;
  margin: 4px 0 7px;
  font-size: 12px;
}

.node span {
  display: block;
  height: 5px;
  background: rgba(255, 244, 220, 0.12);
}

.node i {
  display: block;
  height: 100%;
  background: var(--green);
}

.node.hot i {
  background: var(--lime);
}

.ops-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  color: rgba(255, 244, 220, 0.82);
  font-size: 12px;
  line-height: 1.25;
}

.ops-table th,
.ops-table td {
  overflow-wrap: anywhere;
}

.ops-table th,
.ops-table td {
  border-bottom: 1px solid rgba(255, 244, 220, 0.12);
  padding: 9px 8px;
  text-align: left;
  vertical-align: top;
}

.ops-table th {
  color: rgba(255, 244, 220, 0.44);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.ops-table td:last-child {
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.app-detail {
  border-left: 2px solid var(--app-line);
  padding: 20px 28px 20px 18px;
}

.detail-box {
  border: 1px solid rgba(255, 244, 220, 0.2);
  background: rgba(255, 244, 220, 0.04);
  padding: 16px;
  margin-bottom: 14px;
}

.detail-box strong {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  line-height: 1.15;
}

.detail-box p {
  margin: 0;
  color: rgba(255, 244, 220, 0.62);
  font-size: 13px;
  line-height: 1.42;
}

.proof-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: calc(var(--container) - (var(--page-pad) * 2));
  margin: 4px auto 46px;
  border: 4px solid var(--ink);
  background: var(--paper);
}

.proof-tile {
  min-height: 232px;
  border-right: 3px solid var(--ink);
  padding: 26px;
}

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

.proof-tile.blue {
  background: var(--blue);
  color: var(--paper);
}

.proof-tile.lime {
  background: var(--lime);
}

.proof-tile small,
.proof-card small {
  display: block;
  margin-bottom: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.proof-tile strong {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 3.8vw, 3.85rem);
  line-height: 0.94;
  font-variation-settings: "SOFT" 30, "WONK" 1;
}

.proof-tile p,
.proof-card p {
  margin: 16px 0 0;
  font-size: 15px;
  line-height: 1.42;
}

.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(72px, 8vw, 112px) var(--page-pad);
}

.work-section {
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  background: rgba(251, 244, 232, 0.72);
}

.section h2 {
  margin: 20px 0 0;
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 4.8vw, 5.5rem);
  line-height: 0.94;
  letter-spacing: 0;
  font-variation-settings: "SOFT" 35, "WONK" 1;
}

.text-stack {
  display: grid;
  align-content: center;
  gap: 20px;
  color: #30332e;
  font-size: clamp(18px, 1.55vw, 22px);
  line-height: 1.5;
}

.text-stack p {
  margin: 0;
}

.section-heading {
  max-width: 940px;
  margin-bottom: 34px;
}

.system-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 4px solid var(--ink);
}

.system-grid article {
  min-height: 286px;
  border-right: 3px solid var(--ink);
  background: var(--paper);
  padding: 26px;
}

.system-grid article:last-child {
  border-right: 0;
}

.system-grid article:nth-child(even) {
  background: var(--paper-soft);
}

.system-grid span {
  display: block;
  margin-bottom: 52px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.system-grid h3 {
  margin: 0 0 14px;
  font-size: clamp(25px, 2vw, 31px);
  line-height: 1.02;
}

.system-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.method {
  border-top: 3px solid var(--ink);
}

.steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 0;
  margin: 0;
  counter-reset: steps;
  list-style: none;
}

.steps li {
  min-height: 174px;
  border: 3px solid var(--ink);
  background: var(--paper);
  padding: 22px;
  counter-increment: steps;
}

.steps li::before {
  content: "0" counter(steps);
  display: block;
  margin-bottom: 24px;
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.steps strong {
  display: block;
  margin-bottom: 10px;
  font-size: 24px;
  line-height: 1.1;
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.proof-system {
  border-top: 3px solid var(--ink);
}

.proof-system-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.proof-card {
  min-height: 258px;
  border: 3px solid var(--ink);
  background: var(--app-bg);
  color: var(--app-text);
  padding: 26px;
}

.proof-card:nth-child(2) {
  background: var(--blue);
}

.proof-card:nth-child(3) {
  background: var(--lime);
  color: var(--ink);
}

.proof-card strong {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(40px, 3.4vw, 54px);
  line-height: 0.96;
  font-variation-settings: "SOFT" 30, "WONK" 1;
}

.contact {
  max-width: calc(var(--container) - (var(--page-pad) * 2));
  margin: 0 auto 40px;
  border: 4px solid var(--ink);
  background: var(--red);
  color: var(--paper);
}

.contact-inner {
  max-width: 980px;
  padding: clamp(42px, 5vw, 72px);
}

.contact .eyebrow {
  background: var(--ink);
}

.contact h2 {
  margin: 20px 0 18px;
  font-family: var(--font-serif);
  font-size: clamp(3rem, 6vw, 6.8rem);
  line-height: 0.9;
  font-variation-settings: "SOFT" 35, "WONK" 1;
}

.contact p {
  max-width: 760px;
  color: rgba(251, 244, 232, 0.84);
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.48;
}

.contact .btn-primary {
  background: var(--paper);
  color: var(--ink);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 3px solid var(--ink);
  padding: 24px var(--page-pad) 30px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

@media (max-width: 1900px) {
  .product-body {
    grid-template-columns: 204px minmax(0, 1fr);
  }

  .app-detail {
    display: none;
  }
}

@media (max-width: 1180px) {
  .header-grid {
    grid-template-columns: 210px 1fr;
  }

  .header-actions {
    grid-column: 1 / -1;
    justify-content: space-between;
    border-left: 0;
    border-top: 3px solid var(--ink);
    padding: 14px 22px;
  }

  .section-grid,
  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-copy {
    min-height: auto;
    padding-bottom: 34px;
  }

  h1 {
    max-width: 10.8ch;
  }

  .product-body {
    grid-template-columns: 200px minmax(360px, 1fr);
  }

  .proof-strip,
  .system-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .proof-tile:nth-child(2),
  .system-grid article:nth-child(2) {
    border-right: 0;
  }

  .proof-tile:nth-child(-n + 2),
  .system-grid article:nth-child(-n + 2) {
    border-bottom: 3px solid var(--ink);
  }
}

@media (max-width: 860px) {
  body {
    font-size: 16px;
    background-size: 44px 44px;
  }

  .header-grid {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .brand,
  .nav,
  .header-actions {
    border-right: 0;
    border-left: 0;
  }

  .brand {
    min-height: 64px;
    border-bottom: 3px solid var(--ink);
    padding: 0 20px;
    font-size: 25px;
  }

  .nav {
    min-height: 54px;
    gap: 18px;
    max-width: 100%;
    overflow-x: hidden;
    padding: 0 20px;
    font-size: 10.5px;
  }

  .header-actions {
    padding: 12px 20px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
  }

  .header-cta {
    min-height: 42px;
    width: 100%;
    min-width: 0;
  }

  .section-grid,
  .hero,
  .section {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero {
    min-height: auto;
    padding-top: 32px;
    padding-bottom: 32px;
  }

  .hero-copy {
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 32px;
  }

  h1 {
    max-width: 8.2ch;
    margin-top: 22px;
    margin-bottom: 20px;
    font-size: clamp(3.2rem, 13.4vw, 4.15rem);
    line-height: 0.9;
  }

  .lede,
  .text-stack,
  .contact p {
    font-size: 17px;
    line-height: 1.48;
  }

  .eyebrow {
    min-height: 32px;
    font-size: 10px;
  }

  .product-shell {
    width: 100%;
    min-width: 0;
    box-shadow: none;
    border-width: 3px;
  }

  .product-shell::after {
    width: 8px;
  }

  .product-top {
    grid-template-columns: 1fr;
    font-size: 10px;
  }

  .product-top span {
    min-height: 40px;
    border-right: 0;
    border-bottom: 1px solid var(--app-line);
  }

  .product-body {
    grid-template-columns: 1fr;
    min-width: 0;
    overflow: hidden;
  }

  .app-side {
    border-right: 0;
    border-bottom: 2px solid var(--app-line);
    padding: 18px;
  }

  .app-side-item:nth-of-type(n + 5) {
    display: none;
  }

  .app-title-row,
  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .app-title-row span {
    max-width: none;
  }

  .kpi-grid {
    grid-template-columns: 1fr 1fr;
  }

  .kpi {
    min-width: 0;
  }

  .flow-map {
    display: none;
  }

  .ops-table th:nth-child(2),
  .ops-table td:nth-child(2),
  .ops-table th:nth-child(4),
  .ops-table td:nth-child(4) {
    display: none;
  }

  .ops-table {
    table-layout: fixed;
    font-size: 12px;
  }

  .proof-strip,
  .system-grid,
  .steps,
  .proof-system-grid {
    grid-template-columns: 1fr;
    margin-left: 20px;
    margin-right: 20px;
  }

  .proof-tile,
  .system-grid article {
    border-right: 0;
    border-bottom: 3px solid var(--ink);
  }

  .proof-tile:last-child,
  .system-grid article:last-child {
    border-bottom: 0;
  }

  .section h2 {
    font-size: clamp(2.6rem, 12vw, 4.15rem);
    line-height: 0.94;
  }

  .section {
    padding-top: 68px;
    padding-bottom: 68px;
  }

  .proof-tile,
  .system-grid article,
  .proof-card {
    min-height: auto;
    padding: 24px;
  }

  .proof-tile strong,
  .proof-card strong {
    font-size: clamp(2.75rem, 13vw, 4rem);
  }

  .system-grid span {
    margin-bottom: 34px;
  }

  .steps li {
    min-height: auto;
  }

  .contact {
    margin-left: 20px;
    margin-right: 20px;
  }

  .contact-inner {
    padding: 34px 24px;
  }

  .footer {
    display: grid;
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 430px) {
  .nav {
    gap: 14px;
    font-size: 9.5px;
  }

  .lang-toggle button {
    width: 43px;
  }

  .header-actions {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .hero-actions .btn {
    width: 100%;
  }

  .app-main {
    padding: 18px;
  }

  .kpi {
    min-height: 78px;
  }
}
