:root {
  color-scheme: light;
  --paper: #f2f4f1;
  --paper-2: #e6e9e5;
  --ink: #111412;
  --muted: #5e655f;
  --rule: #b5bbb6;
  --signal: #ff5a1f;
  --signal-dark: #d63b00;
  --display: "MOAH Display", "Arial Narrow", sans-serif;
  --body: "MOAH Sans", "Helvetica Neue", sans-serif;
  --mono: "SFMono-Regular", Consolas, monospace;
  --page: min(1440px, calc(100vw - 56px));
}

@font-face {
  font-family: "MOAH Display";
  src: url("assets/display.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "MOAH Sans";
  src: url("assets/body.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

:focus-visible { outline: 3px solid var(--signal); outline-offset: 4px; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.26em; }

button { font: inherit; }

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

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

.site-header {
  width: var(--page);
  min-height: 92px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--ink);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand span { width: 14px; height: 14px; background: var(--signal); }

.nav { display: flex; align-items: center; gap: clamp(20px, 3vw, 48px); }

.nav a {
  position: relative;
  padding: 12px 0;
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 6px;
  height: 2px;
  background: var(--signal);
  transition: right 180ms ease-out;
}

.nav a:hover::after,
.nav a[aria-current="page"]::after { right: 0; }

.home-hero,
.inner-page,
.definition-section { width: var(--page); margin-inline: auto; }

.home-hero { padding-top: clamp(54px, 7vw, 110px); }

.hero-copy { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.55fr); align-items: end; gap: 64px; }

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

.hero-copy h1,
.page-hero h1 {
  margin-bottom: 0;
  font-family: var(--display);
  font-size: clamp(4.5rem, 10.8vw, 10rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.82;
  text-wrap: balance;
}

.hero-copy p {
  max-width: 33rem;
  margin-bottom: 0.3rem;
  font-size: clamp(1.15rem, 1.55vw, 1.5rem);
  line-height: 1.42;
}

.install-block {
  position: relative;
  width: min(720px, 100%);
  margin-top: clamp(40px, 5vw, 64px);
  margin-inline: auto;
  border: 1px solid var(--rule);
  background: var(--paper-2);
}

.install-methods { display: flex; flex-wrap: wrap; padding: 0 8px; border-bottom: 1px solid var(--rule); }
.install-methods[hidden] { display: none; }
.install-methods button { min-height: 44px; padding: 10px 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; font-family: var(--mono); font-size: 0.75rem; color: var(--muted); cursor: pointer; }
.install-methods button:hover { color: var(--ink); }
.install-methods button[aria-pressed="true"] { color: var(--signal-dark); border-bottom-color: var(--signal-dark); font-weight: 800; }

.install-command { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 20px; }

.install-command code { min-width: 0; padding-block: 16px; overflow-wrap: anywhere; font-family: var(--mono); font-size: clamp(1rem, 1.4vw, 1.25rem); }

.copy-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 112px;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 14px 0 14px 18px;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.copy-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.copy-button:hover { color: var(--signal-dark); }
.copy-button.is-copied { color: var(--signal-dark); }
.copy-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.copy-status.is-error { position: static; display: block; width: auto; height: auto; clip: auto; padding: 0 20px 16px; color: var(--signal-dark); }


.crane-figure { margin: 10px 0 0; border-top: 1px solid var(--ink); overflow: hidden; }

.crane-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: contain;
}

.definition-section { padding: clamp(100px, 12vw, 180px) 0 100px; }

.section-heading { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 72px; border-top: 1px solid var(--ink); padding-top: 26px; }

.section-heading h2,
.states-section > h2,
.strategies-section > h2,
.results-section > h2,
.against-section > h2 {
  grid-row: span 2;
  font-family: var(--display);
  font-size: clamp(2.7rem, 5vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.section-heading p { max-width: 65ch; margin-bottom: 0; font-size: 1.12rem; }

.feature-list { margin-top: clamp(64px, 8vw, 120px); border-top: 1px solid var(--ink); }

.feature-list article {
  display: grid;
  grid-template-columns: 22px minmax(220px, 0.7fr) 1.3fr;
  gap: 20px;
  align-items: baseline;
  min-height: 96px;
  padding: 26px 0;
  border-bottom: 1px solid var(--rule);
}

.feature-mark { width: 10px; height: 10px; background: var(--signal); }
.feature-list h3 { margin: 0; font-size: 1.16rem; }
.feature-list p { margin: 0; color: var(--muted); font-size: 1.05rem; }

.inner-page { padding-bottom: 120px; }

.page-hero { display: grid; grid-template-columns: 1.6fr 0.7fr; align-items: end; gap: 64px; min-height: 470px; padding: 76px 0 64px; }

.page-hero h1 { font-size: clamp(4.2rem, 9vw, 8.5rem); }

.page-hero > p { max-width: 38rem; margin-bottom: 0.4rem; font-size: clamp(1.16rem, 1.5vw, 1.45rem); }

.architecture-diagram {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(90px, 0.5fr) minmax(180px, 0.8fr) minmax(90px, 0.5fr) minmax(180px, 1fr);
  gap: 26px;
  align-items: center;
  min-height: 510px;
  padding: 48px;
  background: var(--ink);
  color: var(--paper);
}

.diagram-column { align-self: stretch; display: flex; flex-direction: column; }
.diagram-label { margin: 0; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.75rem; color: var(--signal); }
.diagram-sub { margin: 4px 0 30px; font-family: var(--display); font-size: 1.35rem; font-weight: 700; }

.tool-stack { display: grid; gap: 8px; margin-top: auto; }
.tool-stack span { display: block; border: 1px solid #6c746e; padding: 9px 12px; font-family: var(--mono); font-size: 0.86rem; }
.active-stack span { border-color: #9ea59f; }
.active-stack .accent-tool { background: var(--signal); color: var(--ink); border-color: var(--signal); font-weight: 800; }

.router-core { margin: auto 0; min-height: 180px; display: grid; place-items: center; align-content: center; border: 1px solid var(--signal); }
.router-core span { font-family: var(--display); font-size: 4rem; font-weight: 850; color: var(--signal); line-height: 1; }
.router-core small { font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.12em; }

.route-line { display: flex; align-items: center; }
.route-line span { height: 1px; flex: 1; background: #6c746e; }
.route-line svg { width: 44px; fill: none; stroke: var(--signal); stroke-width: 1.5; }

.states-section,
.strategies-section,
.results-section,
.against-section { padding-top: clamp(100px, 12vw, 170px); }

.states-list { margin-top: 46px; border-top: 1px solid var(--ink); }
.states-list article { display: grid; grid-template-columns: 0.75fr 1.25fr; gap: 60px; padding: 30px 0; border-bottom: 1px solid var(--rule); }
.states-list h3 { margin: 0; font-family: var(--mono); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; }
.states-list p { margin: 0; font-size: 1.15rem; }

.strategy-list { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 46px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.strategy-list article { min-height: 230px; padding: 28px 32px 36px 0; }
.strategy-list article + article { padding-left: 32px; border-left: 1px solid var(--rule); }
.strategy-list h3 { font-family: var(--display); font-size: 2rem; letter-spacing: -0.025em; }
.strategy-list p { max-width: 28ch; color: var(--muted); }

.benchmark-hero { min-height: 530px; }

.results-section > h2,
.against-section > h2 { margin-bottom: 46px; }

.table-wrap { overflow-x: auto; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
table { width: 100%; min-width: 760px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 24px 28px; text-align: left; border-bottom: 1px solid var(--rule); font-size: 1.1rem; }
thead th { font-family: var(--mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }
tbody th { font-weight: 600; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
.moah-column { background: var(--signal); color: var(--ink); font-weight: 800; }

.benchmark-note { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 64px; padding: 38px 0; border-bottom: 1px solid var(--ink); }
.benchmark-note h3 { margin: 0; font-family: var(--display); font-size: clamp(2rem, 3.5vw, 3.6rem); line-height: 1; letter-spacing: -0.03em; }
.benchmark-note p { max-width: 58ch; margin: 0; font-size: 1.1rem; }

.big-metrics { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.big-metrics article { padding: 42px 50px 52px 0; }
.big-metrics article + article { padding-left: 50px; border-left: 1px solid var(--ink); }
.big-metrics strong { display: block; font-family: var(--display); font-size: clamp(5.5rem, 12vw, 11rem); line-height: 0.82; letter-spacing: -0.04em; color: var(--signal-dark); }
.big-metrics h3 { margin: 24px 0 10px; font-size: 1.3rem; }
.big-metrics p { max-width: 38ch; margin: 0; color: var(--muted); }

.source-links { display: flex; gap: clamp(24px, 4vw, 64px); flex-wrap: wrap; padding: 34px 0; }
.source-links a { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; }
.source-links svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }

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

@media (max-width: 900px) {
  :root { --page: min(100% - 36px, 760px); }
  .site-header { min-height: 78px; }
  .hero-copy,
  .page-hero,
  .section-heading { grid-template-columns: 1fr; }
  .hero-copy { gap: 30px; }
  .hero-copy h1,
  .page-hero h1 { font-size: clamp(4rem, 17vw, 7rem); }
  .page-hero { min-height: 0; padding: 70px 0 54px; gap: 34px; }
  .section-heading h2 { grid-row: auto; margin-bottom: 18px; }
  .architecture-diagram { grid-template-columns: 1fr; gap: 18px; padding: 28px; }
  .diagram-column { min-height: 0; }
  .tool-stack { margin-top: 0; }
  .route-line { height: 56px; justify-content: center; transform: rotate(90deg); }
  .route-line span { display: none; }
  .route-line svg { width: 54px; }
  .router-core { min-height: 150px; }
  .strategy-list { grid-template-columns: 1fr; }
  .strategy-list article { min-height: 0; padding: 28px 0; }
  .strategy-list article + article { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .benchmark-note { grid-template-columns: 1fr; gap: 28px; }
  .big-metrics { grid-template-columns: 1fr; }
  .big-metrics article { padding: 42px 0; }
  .big-metrics article + article { padding-left: 0; border-left: 0; border-top: 1px solid var(--ink); }
}

@media (max-width: 620px) {
  :root { --page: calc(100% - 28px); }
  .site-header { align-items: flex-start; padding: 20px 0 16px; gap: 22px; }
  .brand { font-size: 1.1rem; }
  .brand span { width: 11px; height: 11px; }
  .nav { gap: 14px; justify-content: flex-end; flex-wrap: wrap; }
  .nav a { padding: 2px 0 8px; font-size: 0.8rem; }
  .nav a::after { bottom: 2px; }
  .home-hero { padding-top: 54px; }
  .hero-copy h1,
  .page-hero h1 { font-size: clamp(3.7rem, 19vw, 5rem); line-height: 0.86; }
  .hero-copy p,
  .page-hero > p { font-size: 1.08rem; }
  .install-block { margin-top: 42px; }
  .install-command { min-height: 66px; }
  .install-command code { font-size: 0.88rem; }
  .copy-button { min-width: 40px; padding-left: 8px; }
  .copy-button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .crane-figure { margin-top: 0; }
  .crane-figure img { width: 100%; margin-left: 0; }
  .definition-section { padding-top: 90px; }
  .feature-list article { grid-template-columns: 16px 1fr; gap: 9px 12px; padding: 22px 0; }
  .feature-list p { grid-column: 2; }
  .states-list article { grid-template-columns: 1fr; gap: 8px; padding: 24px 0; }
  .architecture-diagram { margin-inline: -14px; }
  .results-section > h2,
  .against-section > h2 { font-size: 2.9rem; }
  table { min-width: 0; table-layout: fixed; }
  thead th:first-child,
  tbody th { width: 36%; }
  th,
  td { padding: 17px 6px; font-size: 0.86rem; }
  thead th { font-size: 0.62rem; letter-spacing: 0.04em; }
  .source-links { flex-direction: column; gap: 18px; }
}

@media (prefers-reduced-motion: no-preference) {
  .install-block::before {
    content: "";
    position: absolute;
    left: 0;
    top: -1px;
    width: 28%;
    height: 2px;
    background: var(--signal);
    transform-origin: left;
    animation: signal-draw 720ms cubic-bezier(.16, 1, .3, 1) both;
    pointer-events: none;
  }
  @keyframes signal-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}
