/* negbeta.com home. One idea: the cost curve of intelligence, drawn like a blue-line print,
   falling towards a floor labelled "too cheap to meter". Everything else stays quiet.
   Also styles the inference policy pages (see "Long-form documents" below).
   The site legal pages and 404 keep using site.css. */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

/* Cyanotype by default: Prussian ground, pale ink. Light mode is the blue-line print. */
:root {
  color-scheme: dark;
  --ground: #0d2840;
  --ink: #eef3f6;
  --ink-2: #a9c1d3;
  --ink-3: #7f9db4;
  --rule: rgba(238, 243, 246, 0.18);
  --grid: rgba(238, 243, 246, 0.07);
  --header: rgba(13, 40, 64, 0.86);

  --gutter: clamp(16px, 4.5vw, 56px);
  --max: 1240px;
  --col-gap: clamp(16px, 2.4vw, 32px);
  --ease: cubic-bezier(0.3, 0.7, 0.2, 1);
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --ground: #f3f5f6;
    --ink: #0d2840;
    --ink-2: #3f5a70;
    --ink-3: #566e82;
    --rule: rgba(13, 40, 64, 0.2);
    --grid: rgba(13, 40, 64, 0.07);
    --header: rgba(243, 245, 246, 0.88);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
h1, h2, p, figure { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; text-decoration-color: var(--ink-3); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--ground); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.nowrap { white-space: nowrap; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -100px; z-index: 50; padding: 10px 14px;
  background: var(--ink); color: var(--ground); text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; }

/* Header: a plain bar; translucent only so the page stays legible under it */
.top {
  position: sticky; top: 0; z-index: 10;
  background: var(--header);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.mark {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-stretch: 112%; font-size: 17px; letter-spacing: -0.01em; text-decoration: none;
}
.mark svg { color: var(--ink); flex: none; }
.mark-n { fill: var(--ground); }
.top-nav { display: flex; gap: clamp(16px, 3vw, 32px); font-size: 15px; }
.top-nav a { text-decoration: none; color: var(--ink-2); }
.top-nav a:hover { color: var(--ink); text-decoration: underline; }

/* Hero: the headline sits in the empty space above the curve */
.hero {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap);
  padding-top: clamp(40px, 6vw, 72px);
}
.headline {
  grid-column: 1 / -1;
  font-weight: 620; font-stretch: 116%;
  font-size: clamp(40px, 6.6vw, 88px);
  line-height: 1.02; letter-spacing: -0.025em;
  max-width: 12.5ch;
  text-wrap: balance;
}
.plot {
  grid-column: 1 / -1;
  position: relative;
  margin-top: clamp(28px, 6vw, 48px);
  aspect-ratio: 1 / 1.05;
  font-stretch: 86%;
}
.lede {
  grid-column: 1 / -1;
  margin-top: clamp(32px, 5vw, 56px);
  font-size: clamp(19px, 1.9vw, 24px); line-height: 1.45; letter-spacing: -0.005em;
  max-width: 30em; color: var(--ink);
}
@media (min-width: 900px) {
  .headline { grid-column: 4 / -1; grid-row: 1; align-self: start; padding-top: clamp(16px, 3vw, 40px); position: relative; z-index: 1; }
  .plot { grid-row: 1; margin-top: 0; aspect-ratio: 1200 / 700; }
  .lede { grid-column: 4 / span 7; }
}

.plot-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.plot-svg path { fill: none; vector-effect: non-scaling-stroke; }
.plot-grid path { stroke: var(--grid); stroke-width: 1; }
.plot-axis { stroke: var(--ink-2); stroke-width: 1.25; }
.plot-floor { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 6; }
.plot-curve { stroke: var(--ink); stroke-width: 2.25; stroke-linecap: round; }

.plot-label, .plot-caption {
  position: absolute; font-size: 14px; line-height: 1.25; letter-spacing: 0.02em; word-spacing: 0.08em; color: var(--ink-2); white-space: nowrap;
}
.plot-caption { left: 0; top: calc(95.3% + 8px); color: var(--ink-3); }
.plot-y { left: 3%; top: 0; }
.plot-x { right: 0; top: calc(95.3% + 8px); }
.plot-floor-label { right: 0; top: calc(87.8% + 7px); color: var(--ink); font-weight: 600; }
.plot-x { display: none; }
@media (min-width: 560px) { .plot-x { display: block; } .plot-floor-label { right: 64px; } }

/* Businesses: two columns split by a rule, not cards */
.ventures {
  display: grid; grid-template-columns: 1fr; gap: 0;
  margin-top: clamp(80px, 11vw, 152px);
}
.venture { border-top: 1px solid var(--rule); padding: 24px 0 48px; }
.venture h2, .row h2 {
  font-weight: 620; font-stretch: 112%;
  font-size: clamp(26px, 2.8vw, 36px); line-height: 1.1; letter-spacing: -0.02em;
}
.venture-lede { margin-top: 16px; max-width: 30em; color: var(--ink-2); }
.venture-meta { margin-top: 12px; color: var(--ink-2); }
.venture-link { margin-top: 24px; font-weight: 600; }
.venture-apps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.venture-apps .venture-still { width: 112px; border-radius: 56px 56px 3px 3px; order: -1; }
.venture-still {
  width: 148px; aspect-ratio: 27 / 35; object-fit: cover;
  border-radius: 74px 74px 3px 3px;
}
@media (min-width: 560px) {
  .venture-apps { grid-template-columns: minmax(0, 1fr) 148px; gap: 28px; }
  .venture-apps .venture-still { width: 148px; border-radius: 74px 74px 3px 3px; order: 0; }
}
@media (min-width: 900px) {
  .ventures { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
  .venture { grid-column: span 6; padding-bottom: 8px; }
  .venture + .venture { border-left: 1px solid var(--rule); padding-left: var(--col-gap); margin-left: calc(-1 * var(--col-gap) / 2); }
  .venture-lede { max-width: 26em; }
}

/* Text rows: heading on the left, prose on the headline's column */
.row {
  display: grid; grid-template-columns: 1fr; gap: 16px;
  margin-top: clamp(80px, 11vw, 152px);
}
.row > h2 { border-top: 1px solid var(--rule); padding-top: 24px; }
@media (max-width: 899px) { .row { background: none; } }
.row-body { display: grid; gap: 16px; max-width: 34em; }
.row-body p { color: var(--ink-2); }
.row-body p:first-child { color: var(--ink); font-size: clamp(19px, 1.9vw, 22px); line-height: 1.45; }
.row + .row { margin-top: clamp(56px, 7vw, 96px); }
@media (min-width: 900px) {
  .row {
    grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); padding-top: 24px;
    background: linear-gradient(var(--rule), var(--rule)) content-box top / 100% 1px no-repeat;
  }
  .row > h2 { text-wrap: balance; }
  .row > h2 { grid-column: 1 / span 3; border-top: 0; padding-top: 0; font-size: clamp(22px, 2vw, 26px); }
  .row-body { grid-column: 4 / span 7; }
}

/* Footer */
.foot { margin-top: clamp(96px, 12vw, 168px); border-top: 1px solid var(--rule); padding: 36px 0 calc(40px + env(safe-area-inset-bottom)); }
.foot-grid { display: grid; gap: 16px var(--col-gap); grid-template-columns: 1fr; font-size: 14px; line-height: 1.6; }
.foot-mark { font-weight: 700; font-stretch: 112%; font-size: 16px; }
.foot-legal { color: var(--ink-3); max-width: 46em; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot-nav a { color: var(--ink-2); text-decoration: none; }
.foot-nav a:hover { color: var(--ink); text-decoration: underline; }
.foot-copy { color: var(--ink-3); }
@media (min-width: 900px) {
  .foot-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .foot-mark { grid-column: 1 / span 3; }
  .foot-legal { grid-column: 4 / span 5; }
  .foot-nav { grid-column: 9 / span 4; justify-content: flex-end; align-content: start; }
  .foot-copy { grid-column: 1 / span 3; }
}

/* The one moment of motion: the curve is drawn, then its floor is labelled */
.plot-curve { stroke-dasharray: 1 1; stroke-dashoffset: 1; animation: draw 1.9s 0.2s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.plot-floor-label { animation: settle 0.7s 1.6s var(--ease) both; }
@keyframes settle { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .plot-curve { animation: none; stroke-dashoffset: 0; stroke-dasharray: none; }
  .plot-floor-label { animation: none; }
}

/* Long-form documents (the inference policy pages): same header, footer and grid as the home
   page; the body is set for reading, with a contents list on the left on wide screens. */
.doc {
  display: grid; grid-template-columns: 1fr; column-gap: var(--col-gap);
  padding-top: clamp(40px, 6vw, 80px);
}
.doc-head { padding-bottom: clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--rule); }
.doc-title {
  font-weight: 620; font-stretch: 112%;
  font-size: clamp(32px, 4.6vw, 60px); line-height: 1.04; letter-spacing: -0.02em;
  max-width: 16ch; text-wrap: balance;
}
.doc-meta { margin-top: 16px; color: var(--ink-2); font-size: 16px; }
.doc-meta strong { font-weight: 600; color: var(--ink); }

.doc-toc { padding: 24px 0 8px; font-size: 15px; line-height: 1.4; }
.doc-toc-title { font-weight: 600; color: var(--ink); }
.doc-toc ol { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 7px; }
.doc-toc a { color: var(--ink-2); text-decoration: none; }
.doc-toc a:hover { color: var(--ink); text-decoration: underline; }

.doc-body {
  max-width: 68ch; padding-top: 8px;
  font-size: clamp(17px, 1.25vw, 18px); line-height: 1.68;
  color: color-mix(in oklab, var(--ink) 88%, var(--ground));
}
.doc-body h2 {
  margin-top: clamp(44px, 5vw, 64px);
  font-weight: 620; font-stretch: 108%; font-size: clamp(21px, 1.9vw, 25px);
  line-height: 1.2; letter-spacing: -0.015em; color: var(--ink);
}
.doc-body h3 { margin-top: 28px; font-weight: 620; font-size: 18px; line-height: 1.3; color: var(--ink); }
.doc-body h2 + p, .doc-body h2 + ul, .doc-body h3 + p, .doc-body h3 + ul { margin-top: 10px; }
.doc-body p { margin-top: 14px; }
.doc-body ul { margin: 14px 0 0; padding-left: 1.25em; }
.doc-body li { margin-top: 8px; padding-left: 0.2em; }
.doc-body li::marker { color: var(--ink-3); }
.doc-body strong { font-weight: 620; color: var(--ink); }
.doc-body code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.88em;
  padding: 0.1em 0.3em; border-radius: 3px; background: var(--grid);
}
.doc-body a { text-decoration-color: var(--ink-3); }
.doc-body > :first-child { margin-top: 24px; }

@media (min-width: 1000px) {
  .doc { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .doc-head { grid-column: 1 / -1; }
  .doc-toc {
    grid-column: 1 / span 3; grid-row: 2; align-self: start;
    position: sticky; top: 84px; padding-top: 36px;
  }
  .doc-body { grid-column: 4 / span 7; grid-row: 2; padding-top: 12px; }
  .doc-body > :first-child { margin-top: 36px; }
}
@media (max-width: 999px) {
  .doc-toc { border-bottom: 1px solid var(--rule); padding-bottom: 24px; }
}
