/* Sections below the memo: What we do, In production, deployment & security, the CTA band, Writing, Careers. */

.section {
  margin-top: var(--sp-section);
  padding-top: var(--sp-rule-head);
  border-top: 1px solid var(--rule);
  scroll-margin-top: 24px;
}
.section h2 {
  margin: 0 0 var(--sp-head-content);
  color: var(--ink);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.section h2.eyebrow {
  margin: 0 0 14px;
  color: var(--ink-60);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.body {
  max-width: 36em;
  color: var(--ink);
  font-size: var(--fs-body);
  line-height: 1.6;
  letter-spacing: 0;
  text-wrap: pretty;
}

/* ---------- What we do ---------- */

#what h2 {
  margin-bottom: 32px;
}
.rows {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin: 0;
}
.row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  align-items: start;
  column-gap: 24px;
}
/* numbered tile: ink on the green surface */
.row-tile {
  display: grid;
  grid-area: 1 / 1 / span 2;
  place-items: center;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.row dt {
  grid-column: 2;
  color: var(--ink);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.row dd {
  grid-column: 2;
  max-width: var(--measure-body);
  margin: 4px 0 0;
  color: var(--ink-68);
  font-size: var(--fs-body);
  line-height: 1.6;
  text-wrap: pretty;
}
.extraction-note {
  margin: 32px 0 0;
  color: var(--ink-68);
  font-size: var(--fs-body);
  line-height: 1.6;
  text-wrap: pretty;
}
.extraction-note a {
  color: var(--accent-text);
}

/* ---------- In production ---------- */

.creed {
  max-width: 19em;
  margin: 0 0 32px;
  color: var(--ink-45);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.28;
  letter-spacing: -0.025em;
  text-wrap: pretty;
}
.creed b {
  color: var(--ink);
  font-weight: 500;
}

.proof {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  grid-template-areas:
    "latency bench"
    "tokens bench"
    "orgs bench"
    "ours ours";
  gap: 12px;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  padding: 18px 20px 20px;
  border: 1px solid var(--rule);
  background: #fff;
  color: var(--ink);
}
.stat-latency {
  grid-area: latency;
}
.stat-tokens {
  grid-area: tokens;
}
.stat-orgs {
  grid-area: orgs;
}
.stat-bench {
  grid-area: bench;
  gap: 0;
}
.stat-ours {
  grid-area: ours;
}
.stat-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.006em;
}
.stat-label small {
  color: var(--ink-60);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.stat-n {
  font-size: 40px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stat-n.sm {
  font-size: 32px;
}
.stat-unit {
  margin-left: 0.06em;
  font-size: 0.6em;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* figures blur up into place once the section is in view (staggered with --t) */
.stat-n,
.ms {
  transition:
    opacity 0.5s var(--ease-out) var(--t, 0s),
    translate 0.5s var(--ease-out) var(--t, 0s),
    filter 0.5s var(--ease-out) var(--t, 0s);
}
html.js #production:not(.is-visible) .stat-n,
html.js #production:not(.is-visible) .ms {
  opacity: 0;
  filter: blur(2px);
  translate: 0 8px;
}

/* latency table */
.ledger {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.ledger th,
.ledger td {
  padding: 0;
  text-align: left;
  vertical-align: baseline;
  white-space: nowrap;
}
.ledger td,
.ledger thead th + th {
  width: 1%;
  padding-left: 18px;
}
.ledger thead th {
  padding-bottom: 12px;
  color: var(--ink-60);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.ledger tbody th {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ledger tbody tr + tr th,
.ledger tbody tr + tr td {
  padding-top: 14px;
}
.ms {
  display: inline-block;
  font-size: 26px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}
.ms i {
  margin-left: 0.08em;
  color: var(--ink-60);
  font-size: 0.5em;
  font-style: normal;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* token stream: an 8-row block chart that scrolls one column at a time */
.stat-blocks {
  display: block;
  width: 100%;
  height: auto;
  margin-top: auto;
  fill: #ededed;
}
.stat-blocks .on {
  fill: var(--accent-text);
  opacity: var(--o, 1);
  transition: opacity 0.3s var(--ease-out) calc(0.26s + var(--c) * 16ms + var(--r) * 30ms);
}
html.js #production:not(.is-visible) .stat-blocks .on {
  opacity: 0;
}
#production.is-settled .stat-blocks .on {
  transition-duration: 0.2s;
  transition-delay: 0s;
}
.stat-blocks [data-stream] {
  transition: translate 0.32s var(--ease-out);
}
#production.is-stepping .stat-blocks rect,
#production.is-stepping .stat-blocks [data-stream] {
  transition: none;
}

/* benchmarks card */
.bench-half {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.bench-half + .bench-half {
  flex: 1;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}
.verdict {
  margin: 0;
  color: var(--ink-86);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  font-variant-numeric: tabular-nums;
  text-wrap: pretty;
}
.verdict b {
  background: var(--accent-tint-strong);
  box-shadow: 0 0 0 3px var(--accent-tint-strong);
  color: var(--ink);
  font-weight: 600;
}
.verdict strong {
  color: var(--ink);
  font-weight: 600;
}
.stat-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.stat-rank {
  position: relative;
  display: flex;
  flex: 1;
  align-items: flex-end;
  gap: 4px;
  min-height: 130px;
  margin-top: auto;
  background: repeating-linear-gradient(to top, var(--rule) 0 1px, transparent 1px 25%);
  background-size: 100% 100%;
}
.stat-rank .bar {
  position: relative;
  flex: 1;
  height: var(--h);
  background: #ededed;
  transform-origin: bottom;
  transition: scale 0.7s var(--ease-standard);
  transition-delay: calc(0.3s + var(--i) * 60ms);
}
/* the featured bar is the type green (3:1+ on white), which carries the mark in white */
.stat-rank .bar.us {
  display: flex;
  justify-content: center;
  padding-top: 12px;
  background: var(--accent-text);
  color: #fff;
}
.stat-rank .bar.us svg {
  display: block;
  width: 19px;
  height: 18px;
  opacity: 1;
  transition: opacity 0.4s var(--ease-out) 1s;
}
html.js #production:not(.is-visible) .stat-rank .bar {
  scale: 1 0;
}

/* two-bar split (scheduler vs everything else), each bar named inside its foot */
.stat-split {
  gap: 8px;
}
.bar-name {
  position: absolute;
  inset: auto 10px 10px;
  color: var(--ink-68);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.stat-rank .bar.us .bar-name {
  color: #fff;
}
html.js #production:not(.is-visible) .stat-rank .bar.us svg {
  opacity: 0;
}

/* our benchmarks: two figures and the cost curve */
.stat-ours {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 20px;
}
.ours-head {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.pair {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 0;
  margin: 0;
}
.pair > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pair > div + div {
  margin-left: 40px;
  padding-left: 40px;
  border-left: 1px solid var(--rule);
}
.pair dt {
  color: var(--ink-60);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pair dd {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
}
.delta {
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

/* the small links inside cards */
.more.stat-more {
  margin-top: 0;
  font-size: 13px;
}
a.more.stat-more .arrow {
  --door: 10px;
}

/* customer quote */
.said {
  margin: 28px 0 0;
  padding: 4px 0 4px 22px;
  border-left: 2px solid var(--accent-text);
}
.said p {
  max-width: 34em;
  color: var(--ink-86);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.005em;
  text-wrap: pretty;
}
.said strong {
  color: var(--ink);
  font-weight: 600;
}
.said figcaption {
  margin-top: 10px;
  color: var(--ink-60);
  font-size: 13px;
  line-height: 1.5;
}

/* ---------- Runs everywhere / security ---------- */

#security .more {
  margin-top: 0;
}
#security .more.deploy {
  margin-top: 14px;
}
.places {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0 0;
}
.place {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rule);
  background: #fff;
}
.place-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 0;
}
.place-name {
  min-height: 2.6em;
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.place-n {
  color: var(--ink-45);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
}
.place-plate {
  position: relative;
  display: grid;
  flex: 1;
  place-items: center;
  min-height: 200px;
  padding: 24px 18px 26px;
}
.place-plate img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 158px;
  object-fit: contain;
}
/* corner registration marks around each illustration */
.tick {
  position: absolute;
  width: 9px;
  height: 9px;
  border: 1px solid var(--rule);
}
.tick.tl {
  top: 10px;
  left: 12px;
  border-right: 0;
  border-bottom: 0;
}
.tick.tr {
  top: 10px;
  right: 12px;
  border-left: 0;
  border-bottom: 0;
}
.tick.bl {
  bottom: 10px;
  left: 12px;
  border-top: 0;
  border-right: 0;
}
.tick.br {
  right: 12px;
  bottom: 10px;
  border-top: 0;
  border-left: 0;
}

.sec {
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--rule);
}
.sec-title {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.sec-text {
  max-width: var(--measure-body);
  margin: 10px 0 0;
  color: var(--ink-68);
  font-size: var(--fs-body);
  line-height: 1.6;
  text-wrap: pretty;
}
.seals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0 0;
}
.seals li {
  display: grid;
  place-items: center;
  height: 100px;
  padding: 20px 12px;
  border: 1px solid var(--rule);
}
/* text seals: the three security properties, set like the place cards' headers */
.seals-text li {
  align-content: space-between;
  justify-items: start;
  place-items: initial;
  padding: 14px 16px;
}
.seal-n {
  color: var(--ink-45);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}
.seal-name {
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.sec-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
}
#security .sec-links {
  margin-top: 24px;
}

/* ---------- CTA band ---------- */

.cta {
  --cta-scrim: 0.72;
  --cta-reach: 100%;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 32px -32px 0;
  padding: 32px;
  /* the diagram's dot grid, inverted onto the dark ground */
  background:
    radial-gradient(#ffffff2e 1px, #0000 1.25px) 8px 8px / 16px 16px,
    var(--aivc-black);
  color: var(--warmwhite);
  outline: 1px solid #0000001a;
  outline-offset: -1px;
}
/* scrim: AIVC dark on the left under the copy, clear by the right edge */
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    90deg,
    rgba(28, 28, 28, var(--cta-scrim)) 0%,
    rgba(28, 28, 28, calc(var(--cta-scrim) * 0.72)) calc(var(--cta-reach) * 0.55),
    #1c1c1c00 var(--cta-reach)
  );
}
.cta-title {
  color: var(--warmwhite);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.cta-text {
  max-width: 30em;
  margin-top: 8px;
  color: var(--warmwhite);
  font-size: 16px;
  line-height: 1.6;
  text-wrap: pretty;
}
/* inverted primary button: white face, green tile with the mark in Black 100; the green wash
   fills it on hover and the label stays Black 100 throughout */
.cta .btn {
  margin-top: 32px;
}
.cta .btn-primary {
  border: 1px solid #09112014;
  background: #fff;
  color: var(--on-accent);
}
.cta .btn-primary::before {
  background: var(--accent);
}
.cta .btn-tile {
  color: var(--logo);
}
.cta .btn-primary:hover .btn-label,
.cta .btn-primary:focus-visible .btn-label {
  color: var(--on-accent);
}
/* the type green sinks on the dark ground; the accent itself clears 12.67:1 there */
.cta :focus-visible {
  outline-color: var(--accent);
}

/* ---------- Roadmap ---------- */

.entries {
  margin: 0;
  border: 1px solid var(--rule);
}
.entries li + li {
  border-top: 1px solid var(--rule);
}
.roadmap-lead {
  margin-bottom: var(--sp-head-content);
}
.entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: var(--ink);
  font-size: 14px;
  line-height: 20px;
}
.entry-tile {
  display: flex;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 1px solid var(--rule);
}
/* merged on main: the green surface; next: the outline */
.is-done .entry-tile,
.entry-tile.is-done {
  border-color: var(--accent);
  background: var(--accent);
}
.entry-note {
  color: var(--ink-60);
}
.entries-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  margin: 12px 0 0;
}
.entries-key {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-60);
  font-size: 13px;
  line-height: 1.5;
}
.entries-key .entry-tile {
  width: 12px;
  height: 12px;
}
.entry-n {
  flex-shrink: 0;
  color: var(--ink-60);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.entry-title {
  min-width: 0;
}

/* ---------- Contribute ---------- */

#contribute .code-block {
  margin-top: 20px;
}

#contribute .more {
  margin-top: 28px;
}

/* ---------- responsive ---------- */

@media (width <= 1000px) {
  .cta {
    margin-inline: -24px;
    padding: 28px 24px;
  }
}

@media (width <= 700px) {
  .places {
    grid-template-columns: minmax(0, 1fr);
  }
  .place-name {
    min-height: 0;
  }
  .seals {
    gap: 8px;
  }
  /* the text seals stack, number beside name */
  .seals-text {
    grid-template-columns: minmax(0, 1fr);
  }
  .seals-text li {
    display: flex;
    align-items: baseline;
    gap: 12px;
    height: auto;
    padding: 12px 14px;
  }
  .proof {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "latency" "tokens" "orgs" "bench" "ours";
  }
  .ledger td,
  .ledger thead th + th {
    padding-left: clamp(18px, 6vw, 40px);
  }
  .stat-rank {
    min-height: 150px;
  }
}

@media (width <= 600px) {
  .section h2 {
    font-size: 22px;
  }
  .creed {
    margin-bottom: 26px;
    font-size: 23px;
  }
  .row {
    column-gap: 16px;
  }
  .pair {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .pair > div + div {
    margin-left: 0;
    padding-left: 16px;
  }
  /* an item that wraps to the start of a row has nothing to its left to divide from */
  .pair > div:nth-child(2n + 1) {
    padding-left: 0;
    border-left: 0;
  }
  .cta-title {
    font-size: 24px;
  }
  .cta .btn {
    margin-top: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .entry,
  .stat-n,
  .ms,
  .stat-rank .bar,
  .stat-blocks .on,
  .stat-blocks [data-stream],
  .stat-rank .bar.us svg {
    transition: none;
  }
  html.js #production:not(.is-visible) .stat-n,
  html.js #production:not(.is-visible) .ms {
    opacity: 1;
    filter: none;
    translate: 0;
  }
  html.js #production:not(.is-visible) .stat-blocks .on {
    opacity: var(--o, 1);
  }
  html.js #production:not(.is-visible) .stat-rank .bar {
    scale: 1;
  }
  html.js #production:not(.is-visible) .stat-rank .bar.us svg {
    opacity: 1;
  }
}
