/* interflowcompute.com — single stylesheet, no build step, no external requests.
   Light theme only. All values come from the tokens below. */

:root {
  color-scheme: light;

  /* paper and ink */
  --paper:       #fbf9f5;
  --band:        #f3ede2;
  --ink:         #13161a;
  --ink-soft:    #474e56;
  --ink-faint:   #666c73;
  --rule:        #e2dacb;

  /* accents */
  --copper:      #a8521f;
  --copper-deep: #83400f;
  --copper-pale: #efd9c7;
  --petrol:      #14544e;

  /* type */
  --font-display: Georgia, "Times New Roman", ui-serif, serif;
  --font-body:    system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono:    ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --text-xs:   0.8125rem;
  --text-sm:   0.9375rem;
  --text-base: 1.0625rem;
  --text-lg:   1.25rem;
  --text-xl:   1.5rem;
  --text-2xl:  2.25rem;
  --text-3xl:  3.25rem;
  --text-huge: 4rem;

  --leading-tight: 1.08;
  --leading-body:  1.65;

  /* space */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: 6.5rem;

  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-pill: 999px;

  --measure: 62ch;
  --container: 58rem;
  --gutter: var(--space-4);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
}

a {
  color: var(--copper);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 120ms ease;
}
a:hover { color: var(--copper-deep); }
a:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- header ---------- */

.masthead {
  border-block-end: 1px solid var(--rule);
  padding-block: var(--space-4);
  background: var(--paper);
}

.masthead .container {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-3) var(--space-6);
  justify-content: space-between;
}

.wordmark {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.wordmark:hover { color: var(--ink); }
.wordmark b { color: var(--copper); font-weight: inherit; }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  font-size: var(--text-sm);
}

.nav a { color: var(--ink-soft); text-decoration: none; padding-block-end: 2px; }
.nav a:hover { color: var(--copper); }
.nav a[aria-current="page"] {
  color: var(--ink);
  border-block-end: 2px solid var(--copper);
}

/* ---------- page body ---------- */

main { padding-block: var(--space-8) var(--space-9); }
main > .container > *:first-child { margin-block-start: 0; }

h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  line-height: var(--leading-tight);
  font-weight: 400;
  margin: 0 0 var(--space-5);
  max-width: 18ch;
  letter-spacing: -0.02em;
}

h1 .dot { color: var(--copper); }

h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: 1.2;
  font-weight: 400;
  margin: var(--space-8) 0 var(--space-4);
}

h3 {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--copper);
  margin: 0 0 var(--space-2);
}

p { max-width: var(--measure); margin: 0 0 var(--space-4); }

.lead {
  font-size: var(--text-lg);
  color: var(--ink-soft);
  max-width: 48ch;
  line-height: 1.55;
}

.tag {
  display: inline-block;
  margin-block: var(--space-5) 0;
  padding: var(--space-2) var(--space-5);
  border: 1px solid var(--copper);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--copper-deep);
  background: color-mix(in oklch, var(--copper-pale) 45%, transparent);
}

/* ---------- big numbers ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: var(--space-6);
  margin-block: var(--space-8);
  padding-block-start: var(--space-6);
  border-block-start: 1px solid var(--rule);
}

.stats dt {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  order: 2;
}

.stats dd {
  margin: 0;
  order: 1;
  font-family: var(--font-display);
  font-size: var(--text-huge);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.stats div { display: flex; flex-direction: column; gap: var(--space-2); }
.stats dd small {
  font-size: var(--text-xl);
  color: var(--copper);
  letter-spacing: 0;
}

/* ---------- the fleet, drawn from the real numbers ---------- */

.fleet {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-3);
  margin-block: var(--space-7);
  max-width: 38rem;
  padding: 0;
  list-style: none;
}

.fleet li {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: var(--space-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  background: var(--paper);
  transition: border-color 140ms ease, background 140ms ease;
}

.fleet li:hover { border-color: var(--copper); background: var(--band); }

.fleet span {
  aspect-ratio: 1;
  border-radius: 1px;
  background: var(--copper);
  opacity: 0.82;
  animation: cell-in 340ms ease-out backwards;
  animation-delay: calc(var(--i, 0) * 26ms);
}

.fleet li:hover span { opacity: 1; }

@keyframes cell-in {
  from { opacity: 0; transform: scale(0.4); }
  to   { opacity: 0.82; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .fleet span { animation: none; }
}

.fleet-caption {
  font-size: var(--text-sm);
  color: var(--ink-faint);
  max-width: none;
}

/* ---------- bands ---------- */

.band {
  background: var(--band);
  border-block: 1px solid var(--rule);
  margin-block: var(--space-9) 0;
  padding-block: var(--space-8);
}

.band h2 { margin-block-start: 0; }

/* ---------- columns ---------- */

.columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: var(--space-7);
  margin-block-start: var(--space-7);
}

.columns > div > p { margin-block-end: 0; max-width: none; }

/* ---------- tables ---------- */

.spec {
  width: 100%;
  border-collapse: collapse;
  margin-block: var(--space-6);
  font-size: var(--text-sm);
}

.spec th,
.spec td {
  text-align: start;
  vertical-align: top;
  padding-block: var(--space-3);
  padding-inline-end: var(--space-5);
  border-block-end: 1px solid var(--rule);
}

.spec th {
  font-weight: 400;
  color: var(--ink-faint);
  white-space: nowrap;
  width: 14rem;
  padding-inline-start: var(--space-2);
}

.spec td { font-family: var(--font-mono); color: var(--ink); }
.spec td strong { font-weight: 600; color: var(--copper-deep); }

.spec tr { transition: background 120ms ease; }
.spec tr:hover { background: var(--band); }

/* ---------- pull quote / note ---------- */

.note {
  margin-block: var(--space-7);
  padding-inline-start: var(--space-5);
  border-inline-start: 3px solid var(--petrol);
}

.note h2 {
  margin-block: 0 var(--space-3);
  font-size: var(--text-2xl);
  color: var(--petrol);
  letter-spacing: -0.01em;
}
.note p { font-size: var(--text-lg); color: var(--ink-soft); }
.note p:last-child { margin-block-end: 0; }

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

.contacts {
  list-style: none;
  margin: var(--space-6) 0;
  padding: 0;
}

.contacts li {
  margin-block-end: var(--space-3);
  font-family: var(--font-mono);
  font-size: clamp(var(--text-base), 4.6vw, var(--text-xl));
  overflow-wrap: anywhere;
}

.place {
  margin-block-start: var(--space-7);
  color: var(--ink-faint);
  font-size: var(--text-sm);
}

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

.colophon {
  border-block-start: 1px solid var(--rule);
  padding-block: var(--space-6) var(--space-7);
  font-size: var(--text-xs);
  color: var(--ink-faint);
}

.colophon p { max-width: none; margin: 0; }
.colophon a { color: var(--ink-faint); }
.colophon a:hover { color: var(--copper); }
.colophon .legal { margin-block-end: var(--space-2); color: var(--ink-soft); }

/* a band that ends the page eats main's bottom padding and meets the footer */
.band:last-child {
  margin-block-end: calc(-1 * var(--space-9));
  border-block-end: 0;
}

@media (max-width: 40rem) {
  :root {
    --text-3xl: 2.25rem;
    --text-huge: 2.75rem;
    --text-2xl: 1.75rem;
  }
  h1 { max-width: none; }
  .fleet { grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
  .spec th { width: auto; white-space: normal; }
  .spec, .spec tbody, .spec tr { display: block; }
  .spec th, .spec td { display: block; border-block-end: 0; padding-inline-end: 0; }
  .spec th { padding-block-end: 0; padding-inline-start: 0; }
  .spec tr { border-block-end: 1px solid var(--rule); padding-block: var(--space-2); }
}

/* ---------- 4: mark in the masthead, same motif as the fleet ---------- */

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}

.mark {
  width: 34px;
  height: 20px;
  flex: none;
  transition: transform 160ms ease;
}

.wordmark:hover .mark { transform: translateY(-1px); }

/* ---------- 5: the chassis diagram, drawn in CSS so its text scales like text ---------- */

.chassis-fig { margin: var(--space-7) 0; }

.chassis {
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}

.crow + .crow { margin-block-start: var(--space-5); }

.chead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  margin-block-end: var(--space-2);
}

.chead > span:first-child {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.chead .cap {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-faint);
}

.cells { display: grid; gap: clamp(4px, 1.1vw, 9px); }
.cells i { display: block; border-radius: 2px; }

.cells.gpu { grid-template-columns: repeat(8, 1fr); }
.cells.gpu i { height: clamp(22px, 4.4vw, 44px); background: var(--copper); opacity: 0.82; }

.cells.host { display: flex; }
.cells.host .cpu {
  flex: 0 0 12%;
  height: clamp(22px, 4.2vw, 42px);
  background: var(--petrol);
  opacity: 0.8;
  border-radius: 2px;
}
.cells.host .dimms {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: clamp(2px, 0.5vw, 4px);
}
.cells.host .dimms i { height: clamp(22px, 4.2vw, 42px); background: var(--ink-faint); opacity: 0.3; border-radius: 1px; }

.cells.net { grid-template-columns: repeat(8, 1fr); }
.cells.net i { height: clamp(12px, 2.3vw, 22px); background: var(--ink); opacity: 0.5; }

.chassis-fig figcaption {
  margin-block-start: var(--space-3);
  font-size: var(--text-sm);
  color: var(--ink-faint);
}

/* ---------- 6: sections arrive as they scroll in ---------- */

@keyframes reveal-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: reveal-in linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
  }
}

/* ---------- 7: a fleet block names itself on hover ---------- */

.fleet li { position: relative; }

.fleet li::after {
  content: "1 system · 8 × HGX B300 · 14.7 kW";
  position: absolute;
  inset-block-end: calc(100% + var(--space-2));
  inset-inline-start: 50%;
  translate: -50% 4px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, translate 140ms ease;
  z-index: 2;
}

.fleet li:hover::after { opacity: 1; translate: -50% 0; }

@media (hover: none) {
  .fleet li::after { content: none; }
}

/* ---------- 8: numbered columns ---------- */

.columns { counter-reset: col; }

.columns h3::before {
  counter-increment: col;
  content: counter(col, decimal-leading-zero);
  margin-inline-end: var(--space-3);
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

/* ---------- 9: small courtesies ---------- */

::selection {
  background: var(--copper-pale);
  color: var(--copper-deep);
}

.nav a { position: relative; }

.nav a:not([aria-current])::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  height: 2px;
  background: var(--copper);
  scale: 0 1;
  transform-origin: left;
  transition: scale 160ms ease;
}

.nav a:not([aria-current]):hover::after { scale: 1 1; }

/* a scroll-timeline animation must never leave content invisible on paper */
@media print {
  .reveal { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* ---------- breathing room at tablet widths ---------- */

@media (min-width: 40rem) { :root { --gutter: var(--space-6); } }
@media (min-width: 52rem) { :root { --gutter: var(--space-7); } }

/* ---------- narrow screens ---------- */

@media (max-width: 40rem) {
  .stats { gap: var(--space-5) var(--space-6); }
}
