/* ==========================================================================
   Systolic Labs — stylesheet
   Self-hosted type, no third-party requests.
   ========================================================================== */

@font-face {
  font-family: 'IBM Plex Sans';
  src: url('fonts/IBMPlexSans-var.woff2') format('woff2');
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('fonts/IBMPlexMono-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('fonts/IBMPlexMono-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---- tokens ------------------------------------------------------------ */

:root {
  --paper: #FAF9F5;
  --surface: #F1EFE7;
  --ink: #171714;
  --muted: #6C6A61;
  --rule: #E0DDD3;
  --accent: #A63D22;
  --accent-ink: #8F331B;

  --sans: 'IBM Plex Sans', system-ui, -apple-system, Segoe UI, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --gut: clamp(1.25rem, 5vw, 3.5rem);
  --measure: 68ch;
  --step: clamp(3.5rem, 7vw, 6rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121211;
    --surface: #1B1B19;
    --ink: #EEECE5;
    --muted: #9C998E;
    --rule: #2E2E2A;
    --accent: #E0724C;
    --accent-ink: #EA8A67;
  }
}

/* ---- reset ------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-weight: 600; margin: 0; letter-spacing: -0.015em; text-wrap: balance; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
strong { font-weight: 600; }
em { font-style: italic; }
time, .mono { font-family: var(--mono); }

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

.wrap { max-width: 1120px; margin-inline: auto; padding-inline: var(--gut); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 10;
  background: var(--ink); color: var(--paper); padding: .7em 1em;
  font-family: var(--mono); font-size: .8rem;
}
.skip-link:focus { left: 0; }

/* ---- masthead ---------------------------------------------------------- */

.masthead {
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 5;
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(6px);
}
.masthead-row {
  display: flex; flex-wrap: wrap; gap: 1rem 2rem;
  align-items: center; justify-content: space-between;
  padding-block: .9rem;
}
.brand { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.brand-mark { width: 22px; height: 22px; flex: none; }
.brand-mark rect { fill: var(--ink); }
.brand-mark .brand-cells rect { fill: var(--paper); }
.brand-mark .brand-core { fill: var(--accent); }
.brand-name { font-weight: 600; letter-spacing: -0.01em; }
.brand-sep { color: var(--rule); }
.brand-tag {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
}
.nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.nav a {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted); text-decoration: none;
  padding-block: .35rem;
}
.nav a:hover { color: var(--accent); }

/* ---- hero -------------------------------------------------------------- */

.hero { padding-block: var(--step) calc(var(--step) * .8); }
.kicker {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 1.4rem;
}
.kicker .dot { color: var(--accent); }
.hero h1 {
  font-size: clamp(1.95rem, 4.4vw, 3.15rem);
  line-height: 1.14;
  max-width: 22ch;
}
.lede {
  margin-top: 1.6rem;
  max-width: 62ch;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.6;
  color: var(--ink);
}

.status {
  margin-top: 1.5rem;
  max-width: 62ch;
  font-size: .95rem;
  line-height: 1.6;
  color: var(--muted);
}
.status .label {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent); margin-right: .55rem;
}

.facts {
  margin: 2.6rem 0 0; padding: 0;
  display: grid; gap: 1.1rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
}
.facts > div { display: flex; flex-direction: column; gap: .35rem; }
.facts dt {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
.facts dd {
  margin: 0; font-size: 1rem; font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* ---- sections + rail layout ------------------------------------------- */

.section { padding-block: calc(var(--step) * .75); border-top: 1px solid var(--rule); }

.rail {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 0 clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.rail-label {
  font-family: var(--mono); font-size: .74rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  position: sticky; top: 4.6rem;
}
.rail-label .idx { display: block; color: var(--accent); margin-bottom: .4rem; }
.rail-body { max-width: var(--measure); }
.rail-body > p:first-child { margin-top: 0; }
.lead-para { font-size: 1.12rem; line-height: 1.6; }

@media (max-width: 760px) {
  .rail { grid-template-columns: 1fr; gap: 1.4rem; }
  .rail-label { position: static; }
  .rail-label .idx { display: inline; margin-right: .5rem; }
}

/* ---- lists ------------------------------------------------------------- */

.spec-list { margin: 0 0 1.2em; padding: 0; list-style: none; }
.spec-list li {
  padding: .6rem 0 .6rem 0;
  border-top: 1px solid var(--rule);
  max-width: 62ch;
}
.spec-list li:last-child { border-bottom: 1px solid var(--rule); }

/* ---- note -------------------------------------------------------------- */

.note {
  margin-top: 2rem;
  background: var(--surface);
  padding: 1.15rem 1.3rem;
  border-radius: 2px;
  max-width: 62ch;
}
.note p { margin: 0; font-size: .95rem; line-height: 1.6; }

/* ---- spec table -------------------------------------------------------- */

.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: .5rem 0 1.6rem;
  font-variant-numeric: tabular-nums;
}
.spec-table tr { border-top: 1px solid var(--rule); }
.spec-table tr:last-child { border-bottom: 1px solid var(--rule); }
.spec-table th, .spec-table td {
  text-align: left; padding: .68rem 0; vertical-align: baseline;
}
.spec-table th {
  width: 34%;
  min-width: 8.5rem;
  padding-right: 1.5rem;
  font-family: var(--mono); font-size: .7rem; font-weight: 400;
  letter-spacing: .09em; text-transform: uppercase; color: var(--muted);
}
.spec-table td { font-size: .98rem; }

.footnote {
  font-size: .9rem; line-height: 1.6; color: var(--muted);
  max-width: 62ch;
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
}
.footnote strong { color: var(--ink); }

/* ---- log --------------------------------------------------------------- */

.log-list { list-style: none; margin: 0; padding: 0; }
.log-list li {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--rule);
}
.log-list li:last-child { border-bottom: 1px solid var(--rule); }
.log-list time {
  font-size: .78rem; letter-spacing: .04em; color: var(--muted);
  padding-top: .28rem; font-variant-numeric: tabular-nums;
}
.log-list h3 { font-size: 1rem; margin-bottom: .35rem; }
.log-list p { font-size: .94rem; line-height: 1.6; color: var(--muted); max-width: 58ch; }
.log-list .planned { opacity: .72; }
.log-list .planned time { color: var(--accent); }
.log-list .planned h3 { font-weight: 500; }
.log-list .current time { color: var(--accent); }
.log-list .current h3 { font-weight: 500; }

@media (max-width: 620px) {
  .log-list li { grid-template-columns: 1fr; gap: .45rem; }
}

/* ---- offers ------------------------------------------------------------ */

.offers {
  display: grid; gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-bottom: 2.25rem;
}
.offer { border-top: 1px solid var(--ink); padding-top: .9rem; }
.offer h3 { font-size: 1rem; margin-bottom: .5rem; }
.offer p { font-size: .95rem; line-height: 1.6; color: var(--muted); }

/* ---- contact ----------------------------------------------------------- */

.contact-line {
  display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap;
  border-top: 1px solid var(--rule); padding-top: 1.2rem;
}
.contact-line .label {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
.mail { font-family: var(--mono); font-size: 1rem; }
.copy {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .08em;
  text-transform: uppercase;
  background: none; color: var(--muted);
  border: 1px solid var(--rule); border-radius: 2px;
  padding: .35rem .6rem; cursor: pointer;
  min-height: 30px;
}
.copy:hover { color: var(--accent); border-color: var(--accent); }
.copy[data-state="done"] { color: var(--accent); border-color: var(--accent); }

/* ---- footer ------------------------------------------------------------ */

.footer { border-top: 1px solid var(--rule); padding-block: 2.5rem 3.5rem; }
.footer-row { display: grid; gap: 1.4rem; }
.legal { font-size: .82rem; line-height: 1.65; color: var(--muted); max-width: 78ch; }
.meta {
  display: flex; gap: .5rem 1.5rem; flex-wrap: wrap;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .05em;
  text-transform: uppercase; color: var(--muted);
}

/* ---- section sub-headings --------------------------------------------- */

.sub {
  font-family: var(--mono); font-size: .72rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
  margin: 2.5rem 0 1rem;
}

.footnote-inline {
  font-size: .92rem; line-height: 1.6; color: var(--muted);
  max-width: 62ch;
}

/* ---- results table ----------------------------------------------------- */

.results {
  width: 100%;
  border-collapse: collapse;
  margin: .25rem 0 1.5rem;
  font-variant-numeric: tabular-nums;
}
.results tr { border-top: 1px solid var(--rule); }
.results tr:last-child { border-bottom: 1px solid var(--rule); }
.results th, .results td { text-align: left; padding: .6rem 0; vertical-align: baseline; }
.results th { font-weight: 400; font-size: .95rem; padding-right: 1.5rem; }
.results td { font-family: var(--mono); font-size: .88rem; text-align: right; }

@media (max-width: 560px) {
  .results th, .results td { display: block; padding: 0; text-align: left; }
  .results tr { display: block; padding: .65rem 0; }
  .results th { font-size: .82rem; color: var(--muted); margin-bottom: .15rem; }
  .results td { font-size: .92rem; }
}

/* ---- resources table (3 columns: label / used-avail / %) --------------- */

.resources {
  width: 100%;
  border-collapse: collapse;
  margin: .25rem 0 1.5rem;
  font-variant-numeric: tabular-nums;
}
.resources tr { border-top: 1px solid var(--rule); }
.resources tr:last-child { border-bottom: 1px solid var(--rule); }
.resources th, .resources td { padding: .58rem 0; text-align: left; vertical-align: baseline; }
.resources th { font-weight: 400; font-size: .93rem; padding-right: 1.5rem; }
.resources td { font-family: var(--mono); font-size: .85rem; text-align: right; white-space: nowrap; }
.resources td:first-of-type { padding-right: 1.4rem; color: var(--muted); }

@media (max-width: 560px) {
  .resources th, .resources td { display: block; padding: 0; text-align: left; white-space: normal; }
  .resources tr { display: block; padding: .65rem 0; }
  .resources th { font-size: .82rem; color: var(--muted); margin-bottom: .15rem; }
  .resources td { font-size: .9rem; }
  .resources td:first-of-type { padding-right: 0; }
}

code {
  font-family: var(--mono);
  font-size: .88em;
  background: var(--surface);
  padding: .1em .35em;
  border-radius: 2px;
}

/* ---- arguments --------------------------------------------------------- */

.arguments { list-style: none; counter-reset: arg; margin: 0; padding: 0; max-width: 64ch; }
.arguments li {
  counter-increment: arg;
  position: relative;
  padding: .85rem 0 .85rem 2.6rem;
  border-top: 1px solid var(--rule);
  font-size: .96rem;
  line-height: 1.62;
}
.arguments li:last-child { border-bottom: 1px solid var(--rule); }
.arguments li::before {
  content: counter(arg, decimal-leading-zero);
  position: absolute; left: 0; top: .9rem;
  font-family: var(--mono); font-size: .74rem; color: var(--accent);
}

/* ---- where it stands --------------------------------------------------- */

.standing {
  display: grid; gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
}
.standing h3 {
  font-family: var(--mono); font-size: .7rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  border-top: 1px solid var(--rule);
  padding-top: .7rem; margin-bottom: .7rem;
}
.standing ul { margin: 0; padding-left: 1.05rem; }
.standing li { font-size: .92rem; line-height: 1.6; color: var(--muted); margin-bottom: .35rem; }

/* ---- hardware platforms ------------------------------------------------ */

.platform + .platform { margin-top: 2.9rem; }
.platform h3 { font-size: 1.02rem; margin-bottom: .3rem; }
.platform .spec-table { margin-top: .85rem; }
.platform-note {
  font-size: .92rem; line-height: 1.6; color: var(--muted);
  margin: .4rem 0 0; max-width: 58ch;
}
.badge {
  font-family: var(--mono); font-size: .63rem; font-weight: 400;
  letter-spacing: .1em; text-transform: uppercase; color: var(--accent);
  white-space: nowrap;
}
.sub-sub {
  font-family: var(--mono); font-size: .7rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  margin: 1.9rem 0 .8rem;
}

/* ---- motion ------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
html { scroll-behavior: smooth; }
