/* Nunito (variable weight, rounded) and VT323, both under the SIL Open Font License: see fonts/. */
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("../fonts/nunito-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("../fonts/nunito-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "VT323";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/vt323-latin.woff2") format("woff2");
}

:root {
  --page: #fff;
  --ink: #000;
  --text: #25252a;
  --muted: #6f6f77;
  --accent-ink: #918ae5;
  --line: rgb(39 39 41 / 0.1);
  --surface: rgb(0 0 0 / 0.04);
  --focus: #3d57f7;

  /* Hanging hardware, shared by the hero exhibit and the team badges. */
  --rope: #747a8c;
  --wire: #a4aab8;
  --metal: #c4c9d0;

  /* One pastel family, taken from the leads' portraits. */
  --mint: #28b88d;
  --lavender: #7765ee;
  --gold: #e6ab4a;
  --peach: #e67e5e;

  --gutter: 24px;
  --section-space: 168px;
}

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

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

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 500 16px/1.6 "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  max-width: 100%;
}

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

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

.skip {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

/* ---------- Type ---------- */

.display {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0;
  font-weight: 800;
}

/* "built by a small team." is 9.7em wide. The size keeps it on one line beside the lede. */
.display-main,
.display-accent {
  display: block;
  font-size: 78px; /* for browsers without container units */
  font-size: min(78px, (100cqi - var(--side) - var(--side-gap)) / 9.85);
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.display-main {
  color: var(--ink);
}

.display-accent {
  color: var(--accent-ink);
}

.title {
  margin: 0;
  color: var(--ink);
  font-size: 50px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.title-pair {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.title-accent {
  color: var(--accent-ink);
}

.lede {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
  text-wrap: pretty;
}

/* ---------- Links and buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
    background-color 0.2s;
}

.button:hover {
  background: var(--text);
  transform: translateY(-1px);
}

.button:active {
  transform: scale(0.97);
}

.button-small {
  height: 36px;
  padding: 0 16px;
  font-size: 14px;
}

.text-link {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgb(0 0 0 / 0.25);
  text-underline-offset: 5px;
  white-space: nowrap;
  transition: text-decoration-color 0.2s;
}

.text-link:hover {
  text-decoration-color: currentColor;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  font-size: 15px;
}

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  transition:
    background-color 0.3s,
    box-shadow 0.3s;
}

.nav.is-scrolled {
  background: rgb(255 255 255 / 0.82);
  box-shadow: 0 1px 0 var(--line);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 68px;
}

.wordmark {
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.nav-links a {
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--ink);
}

/* ---------- Hero ---------- */

.hero {
  padding-top: 64px;
}

.hero-head {
  --side: 340px;
  --side-gap: 48px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--side-gap);
  container-type: inline-size;
}

.hero-side {
  flex: none;
  width: var(--side);
  padding-bottom: 10px;
}

.hero-lede {
  margin-bottom: 26px;
}

/* The exhibit hangs from a rail on two wires, like the team badges further down. */
.exhibit {
  --wire-len: 52px;
  --swing: 0deg;
  --swing-x: 0px;
  position: relative;
  margin: 56px 0 0;
}

.exhibit-rig {
  position: relative;
  height: calc(12px + var(--wire-len));
}

.exhibit-rail {
  position: absolute;
  top: 12px;
  right: 0;
  left: 0;
  height: 1.25px;
  background: linear-gradient(90deg, transparent, var(--rope) 9%, var(--rope) 91%, transparent);
  opacity: 0.6;
}

.exhibit-anchor {
  position: absolute;
  z-index: 2;
  top: 8.5px;
  left: var(--at);
  width: 7px;
  height: 7px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--metal);
  box-shadow: 0 0 0 2px #17182128;
}

.exhibit-wire {
  position: absolute;
  top: 12px;
  left: var(--at);
  width: 1.15px;
  height: var(--wire-len);
  margin-left: -0.6px;
  transform: rotate(var(--swing));
  transform-origin: 50% 0;
  background: var(--wire);
  opacity: 0.85;
}

.exhibit-board {
  position: relative;
  transform: translateX(var(--swing-x));
}

/* Metal eyelet where a wire meets a card or the exhibit board. */
.eyelet {
  position: absolute;
  z-index: 8;
  top: -11px;
  left: var(--at, 50%);
  width: 18px;
  height: 18px;
  transform: translateX(-50%);
  border: 3px solid var(--metal);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px #00000020, 0 1px 2px #00000020;
  pointer-events: none;
}

.eyelet::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #777d8a70;
}

.eyelet > span {
  position: absolute;
  z-index: 1;
  top: 9px;
  left: 50%;
  width: 23px;
  height: 7px;
  transform: translateX(-50%);
  border-radius: 0 0 4px 4px;
  background: var(--metal);
  opacity: 0.92;
}

.exhibit-caption {
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

/* ---------- Before and after ----------
   Both screens share one vertical rhythm, so each legacy row turns into its modern
   row in place as the divider passes. */

.compare {
  --split: 54%;
  --bar: 64px;
  --tabs: 48px;
  --head: 40px;
  --row: 44px;
  --foot: 88px;
  position: relative;
  height: calc(var(--bar) + var(--tabs) + var(--head) + 6 * var(--row) + var(--foot));
  overflow: hidden;
  container-type: inline-size;
  border-radius: 22px;
  background: #fff;
  box-shadow:
    0 0 0 1px rgb(0 0 0 / 0.07),
    0 40px 70px -40px rgb(24 24 48 / 0.35);
  cursor: ew-resize;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

.screen {
  position: absolute;
  inset: 0;
}

.screen-legacy {
  clip-path: inset(0 calc(100% - var(--split)) 0 0);
}

.compare-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split);
  width: 2px;
  margin-left: -1px;
  background: #fff;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.05), -6px 0 18px rgb(116 251 150 / 0.22);
}

.compare-knob {
  position: absolute;
  top: 50%;
  left: clamp(26px, var(--split), calc(100% - 26px));
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  box-shadow:
    0 8px 22px rgb(0 0 0 / 0.2),
    0 0 0 1px rgb(0 0 0 / 0.05);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.compare-knob svg {
  width: 20px;
  height: 20px;
}

.compare.is-dragging .compare-knob {
  transform: translate(-50%, -50%) scale(0.92);
}

.compare-knob:focus-visible {
  outline-offset: 4px;
}

/* Legacy: an 80-column green-screen terminal. */
.l-term {
  --phosphor: #74fb96;
  --phosphor-bright: #e2ffe8;
  position: absolute;
  inset: 0;
  padding: 0 24px;
  overflow: hidden;
  background: radial-gradient(120% 140% at 45% 40%, #0c1f13 0%, #050c08 65%, #020503 100%);
  color: var(--phosphor);
  font-family: "VT323", ui-monospace, Menlo, monospace;
  font-size: clamp(15px, calc((100cqi - 48px) / 38), 32px);
  font-weight: 400;
  line-height: 1;
  text-shadow: 0 0 7px rgb(116 251 150 / 0.45);
}

.l-term::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom, rgb(255 255 255 / 0.035) 0 1px, transparent 1px 3px);
  pointer-events: none;
}

.l-bar,
.l-filter,
.l-foot-line {
  display: flex;
  align-items: center;
  white-space: pre;
}

.l-bar {
  justify-content: space-between;
  height: var(--bar);
  color: var(--phosphor-bright);
}

.l-filter {
  height: var(--tabs);
}

.l-row {
  display: grid;
  grid-template-columns: 5ch 9ch 24ch 6ch 10ch 12ch 12ch;
  align-items: center;
  height: var(--row);
  white-space: pre;
}

.l-row > span {
  overflow: hidden;
}

.l-head {
  height: var(--head);
  color: var(--phosphor-bright);
}

.l-num {
  padding-right: 2ch;
  text-align: right;
}

.l-alert {
  color: #ffc265;
  text-shadow: 0 0 7px rgb(255 194 101 / 0.45);
}

.l-foot {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25em;
  height: var(--foot);
}

.l-cursor {
  display: inline-block;
  width: 1ch;
  height: 0.8em;
  background: var(--phosphor);
  box-shadow: 0 0 7px rgb(116 251 150 / 0.6);
}

.l-narrow {
  display: none;
}

/* Modern: the same desk as a calm, current web app. */
.m-app {
  position: absolute;
  inset: 0;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  line-height: 1.3;
}

.m-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--bar);
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
}

.m-title {
  margin-right: auto;
  color: var(--ink);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.m-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 240px;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--surface);
  color: #8a8a93;
  font-size: 13px;
}

.m-search svg {
  width: 14px;
  height: 14px;
}

.m-new {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 15px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 750;
}

.m-tabs {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  height: var(--tabs);
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.m-tabs > span {
  margin-bottom: -1px;
  padding-bottom: 13px;
  border-bottom: 2px solid transparent;
}

.m-tabs .is-active {
  border-bottom-color: var(--ink);
  color: var(--ink);
  font-weight: 750;
}

.m-tabs b {
  margin-left: 5px;
  color: #a2a2aa;
  font-weight: 600;
}

.m-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1.7fr) 64px 118px 118px 104px;
  gap: 0 16px;
  align-items: center;
  height: var(--row);
  padding: 0 28px;
  border-bottom: 1px solid rgb(39 39 41 / 0.06);
  font-variant-numeric: tabular-nums;
}

.m-head {
  height: var(--head);
  color: #8a8a93;
  font-size: 12px;
}

.m-num {
  text-align: right;
}

.m-quiet {
  color: #8a8a93;
}

.m-customer {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.m-tile {
  display: grid;
  flex: none;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--tone) 18%, #fff);
  color: color-mix(in srgb, var(--tone) 68%, #000);
  font-size: 11px;
  font-weight: 850;
}

.m-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.m-name small {
  display: none;
  color: #8a8a93;
  font-size: 12px;
  font-weight: 600;
}

.m-chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tone) 16%, #fff);
  color: color-mix(in srgb, var(--tone) 70%, #000);
  font-size: 12px;
  font-weight: 750;
}

.m-total {
  color: var(--ink);
  font-weight: 750;
}

.m-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--foot);
  padding: 0 28px;
  color: #8a8a93;
  font-size: 13px;
}

.m-pager {
  display: flex;
  gap: 18px;
}

.m-pager b {
  color: var(--ink);
  font-weight: 750;
}

/* ---------- Sections ---------- */

.section {
  padding-top: var(--section-space);
  scroll-margin-top: 40px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
}

.section-lede {
  max-width: 340px;
  padding-bottom: 6px;
  text-wrap: balance;
}

/* Process */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  margin: 64px 0 0;
  padding: 0;
  list-style: none;
}

.step {
  padding-top: 24px;
  border-top: 1px solid var(--line);
  container-type: inline-size;
}

.step-number {
  display: block;
  color: var(--accent-ink);
  font-size: 60px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* "Switch over, then stay close" is 12.9em wide. The size keeps every title on one line. */
.step-title {
  margin: 30px 0 10px;
  color: var(--ink);
  font-size: 21px; /* for browsers without container units */
  font-size: min(21px, 100cqi / 13.15);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.step-text {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  text-wrap: pretty;
}

/* Team: the badges themselves are styled in team.css. */

.team .badges {
  margin-top: 64px;
}

/* Contact: a big card that catches the light like the badges do. */

.contact {
  padding-bottom: 120px;
}

.contact-panel {
  --px: 50%;
  --py: 50%;
  --light: 0;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 64px;
  align-items: end;
  overflow: hidden;
  padding: 96px 80px;
  border-radius: 36px;
  background: var(--surface);
}

/* "Have a system that’s" is 9.3em wide. The size keeps the question on two lines. */
.contact-title {
  max-width: 16ch;
  font-size: min(64px, 100cqi / 9.5);
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.contact-lede {
  max-width: 46ch;
  margin: 24px 0 36px;
  font-size: 18px;
}

.contact-aside-title {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.contact-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.contact-list li {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 16px;
}

.contact-panel .holo,
.contact-panel .holo-gloss {
  transition: opacity 0.5s ease;
}

/* Unlike a badge, the card's text and button sit above the sheen, so only the surface catches the light. */
.contact-main,
.contact-aside {
  position: relative;
  z-index: 1;
}

.contact-main {
  container-type: inline-size;
}

/* ---------- Footer ---------- */

.footer {
  padding-bottom: 48px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-left: auto;
}

.footer-links a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-note {
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Smaller screens ---------- */

@media (max-width: 1100px) {
  :root {
    --section-space: 128px;
  }

  .hero-head,
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .hero-side {
    width: auto;
    max-width: 520px;
    padding-bottom: 0;
  }

  .display-main,
  .display-accent {
    font-size: min(78px, 100cqi / 9.85);
  }

  .section-lede {
    max-width: 520px;
    padding-bottom: 0;
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 48px 32px;
  }

  .contact-panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
    padding: 72px 48px;
  }

  .contact-aside {
    max-width: 440px;
  }
}

@media (max-width: 760px) {
  .compare {
    --bar: 56px;
    --tabs: 44px;
    --head: 36px;
    --row: 52px;
    border-radius: 18px;
  }

  .l-term {
    padding: 0 16px;
    font-size: clamp(14px, calc((100cqi - 32px) / 16), 24px);
  }

  .l-row {
    grid-template-columns: 7ch 17ch 8ch 8ch;
  }

  .l-opt,
  .l-qty,
  .l-chg,
  .l-wide {
    display: none;
  }

  .l-narrow {
    display: inline;
  }

  .m-bar,
  .m-tabs,
  .m-row,
  .m-foot {
    padding-inline: 18px;
  }

  .m-search,
  .m-id,
  .m-items,
  .m-updated,
  .m-tab-extra,
  .m-wide {
    display: none;
  }

  .m-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0 12px;
  }

  .m-name small {
    display: block;
  }
}

@media (max-width: 720px) {
  :root {
    --gutter: 16px;
    --section-space: 104px;
  }

  .nav-links {
    display: none;
  }

  .nav-inner .button-small {
    margin-left: auto;
  }

  .hero {
    padding-top: 56px;
  }

  .display-main,
  .display-accent {
    font-size: clamp(40px, 11.4vw, 64px);
  }

  .title {
    font-size: clamp(34px, 9vw, 46px);
  }

  .exhibit {
    --wire-len: 40px;
    margin-top: 48px;
  }

  .steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .contact-panel {
    padding: 56px 24px;
    border-radius: 28px;
  }

  .contact-title {
    font-size: clamp(36px, 10vw, 52px);
  }

  .footer-links {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button,
  .compare-knob {
    transition: none;
  }
}
