/* Home page: hero, path picker, project cards, companies, about, contact. */

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 96px;
  gap: 0 28px;
  padding: 96px 40px 104px 24px;
  border-bottom: 1px solid var(--line);
}

.gutter {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 2.15;
  color: var(--dim);
  text-align: right;
  padding-top: 4px;
}

.cmt {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--dim);
  margin: 0 0 28px;
}

.h1 {
  margin: 0;
  font-size: clamp(48px, 9.6cqi, 132px);
  line-height: 0.9;
  font-weight: 850;
  font-stretch: 118%;
  letter-spacing: -0.045em;
}

.typed-line {
  display: block;
  min-height: 1.9em;
  font-size: 0.64em;
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: var(--str);
  margin-top: 0.12em;
}

.caret {
  display: inline-block;
  width: 0.42em;
  height: 0.78em;
  background: var(--accent);
  vertical-align: -0.04em;
  margin-left: 0.08em;
  animation: blink 1.05s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

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

.hero-lede {
  font-size: 21px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 56ch;
  margin: 36px 0 0;
}

.hero-lede strong {
  color: var(--text);
  font-weight: 600;
}

.cfg {
  margin: 56px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  max-width: 1040px;
  overflow: hidden;
}

.cfg > div {
  padding: 22px 22px 24px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cfg > div:last-child {
  border-right: 0;
}

.cfg dt {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--key);
  letter-spacing: 0.04em;
}

.cfg dd {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cfg .v {
  font-size: 19px;
  font-weight: 700;
  font-stretch: 108%;
  line-height: 1.25;
  color: var(--text);
}

.cfg .d {
  font-size: 15px;
  line-height: 1.45;
  color: var(--muted);
}

.minimap {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 8px;
  position: relative;
}

.minimap .mm {
  display: block;
  width: 100%;
  height: auto;
  fill: var(--line);
}

.minimap .vp {
  position: absolute;
  left: -6px;
  right: -6px;
  top: 0;
  height: 150px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--text) 4%, transparent);
  border-radius: 3px;
}

/* Path picker */
.pal-wrap {
  padding: 96px 72px;
  border-bottom: 1px solid var(--line);
}

.pal {
  max-width: 920px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 30px 80px -30px rgb(0 0 0 / 45%);
  overflow: hidden;
}

.pal-in {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 400;
  color: var(--muted);
}

.pal-in .gt {
  color: var(--accent);
  font-weight: 700;
}

.kbd {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 4px 8px;
}

.pal-in .kbd {
  margin-left: auto;
}

.pal-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pal-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
}

.pal-list li:last-child .pal-row {
  border-bottom: 0;
}

.pal-row:hover,
.pal-row:focus-visible,
.pal-row.on {
  background: var(--raised);
}

.pal-row:focus-visible {
  outline-offset: -2px;
}

/* The first row is highlighted until another row is hovered or focused. */
.pal:has(.pal-row:hover, .pal-row:focus-visible) .pal-row.on:not(:hover, :focus-visible) {
  background: transparent;
}

.ico {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.pal-t {
  display: block;
  font-size: 20px;
  font-weight: 700;
  font-stretch: 108%;
  letter-spacing: -0.01em;
}

.pal-d {
  display: block;
  font-size: 15px;
  color: var(--muted);
  margin-top: 4px;
}

.pal-go {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--dim);
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Project cards */
.sec-head .count {
  color: var(--dim);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 64px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: var(--dim);
}

.card.wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}

.ctab {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

.card.wide .ctab {
  grid-column: 1 / -1;
}

.pill {
  margin-left: auto;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.pill.live {
  color: var(--str);
  border-color: color-mix(in srgb, var(--str) 45%, transparent);
}

.pill.dev {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

.cbody {
  padding: 32px 32px 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.h3 {
  margin: 0;
  font-size: 40px;
  line-height: 1;
  font-weight: 800;
  font-stretch: 115%;
  letter-spacing: -0.03em;
}

.card.wide .h3 {
  font-size: 56px;
}

.cbody p {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.chips li {
  font-family: var(--mono);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--raised);
  color: var(--text);
}

.more {
  margin-top: auto;
  padding-top: 12px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--accent);
  font-weight: 500;
}

.more:hover {
  text-decoration: underline;
}

.code {
  margin: 0;
  background: var(--bg);
  border-left: 1px solid var(--line);
  padding: 32px 28px;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 2;
}

.ln {
  white-space: pre;
  color: var(--text);
}

.ln .c {
  color: var(--dim);
}

.ln .k {
  color: var(--key);
}

.ln .s {
  color: var(--str);
}

.ln .g {
  color: var(--dim);
  display: inline-block;
  width: 28px;
}

/* For companies */
.diff {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 14px;
}

.diff-h {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.diff-h .st {
  margin-left: auto;
  color: var(--dim);
}

.diff-list {
  list-style: none;
  margin: 0;
  padding: 0 0 10px;
}

.dl {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  padding: 9px 20px 9px 0;
  line-height: 1.55;
}

.dl .m {
  text-align: center;
  font-weight: 700;
}

.dl.minus {
  color: var(--muted);
}

.dl.minus .m {
  color: var(--accent);
}

.dl.minus .t {
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--accent) 60%, transparent);
}

.dl.plus {
  background: color-mix(in srgb, var(--str) 9%, transparent);
  color: var(--text);
  margin-bottom: 10px;
}

.dl.plus .m {
  color: var(--str);
}

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

.step {
  border-top: 2px solid var(--line);
  padding-top: 24px;
}

.step .sn {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  font-weight: 700;
}

.step h3 {
  margin: 12px 0 10px;
  font-size: 28px;
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -0.02em;
}

.step p {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
}

.trust {
  list-style: none;
  margin: 56px 0 0;
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  font-size: 17px;
  font-weight: 600;
}

.trust li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.trust .ck {
  font-family: var(--mono);
  color: var(--str);
  font-weight: 700;
}

/* About */
.json {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px 30px;
  font-family: var(--mono);
  font-size: 14.5px;
  line-height: 1.95;
  overflow-x: auto;
}

.json > div {
  white-space: pre;
}

.json .k {
  color: var(--key);
}

.json .s {
  color: var(--str);
}

.tl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px;
  margin-top: 72px;
}

.tl h3 {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--dim);
  letter-spacing: 0.04em;
}

.tl h3.also {
  margin-top: 40px;
}

.tl ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tl-row {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.tl-row .yr {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--dim);
  padding-top: 3px;
}

.tl-row b {
  display: block;
  font-size: 18px;
  font-weight: 700;
  font-stretch: 106%;
  line-height: 1.3;
}

.tl-row .org {
  display: block;
  font-size: 15px;
  color: var(--muted);
  margin-top: 3px;
}

.tl-row .note {
  display: block;
  font-size: 15px;
  color: var(--text);
  margin-top: 8px;
  line-height: 1.5;
}

/* Contact */
.contact {
  padding: 128px 72px 120px;
}

.prompt {
  margin: 0;
  font-size: 16px;
  color: var(--dim);
}

.mega {
  display: inline-block;
  margin-top: 28px;
  /* The address is about 11em wide. Size it to fit the column minus padding. */
  font-size: clamp(24px, calc((100cqi - 160px) / 11.2), 116px);
  line-height: 0.95;
  font-weight: 850;
  font-stretch: 118%;
  letter-spacing: -0.045em;
  border-bottom: 4px solid var(--accent);
  padding-bottom: 8px;
  overflow-wrap: anywhere;
}

.mega:hover {
  color: var(--accent);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 48px;
}

@container site (max-width: 980px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding: 64px 24px 72px;
  }

  .gutter,
  .minimap {
    display: none;
  }

  .typed-line {
    min-height: 2.85em;
  }

  .cfg {
    grid-template-columns: minmax(0, 1fr);
  }

  .cfg > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .cfg > div:last-child {
    border-bottom: 0;
  }

  .hero-lede {
    font-size: 18px;
  }

  .pal-wrap,
  .contact {
    padding: 72px 24px;
  }

  .mega {
    font-size: clamp(24px, calc((100cqi - 56px) / 11.2), 116px);
  }

  .pal-row {
    grid-template-columns: 44px minmax(0, 1fr);
    padding: 18px;
  }

  .pal-go,
  .pal-in .kbd {
    display: none;
  }

  .pal-in {
    padding: 18px;
    font-size: 14px;
  }

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

  .card.wide {
    grid-template-columns: minmax(0, 1fr);
  }

  .code {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 24px 20px;
    font-size: 12.5px;
    overflow-x: auto;
  }

  .h3 {
    font-size: 36px;
  }

  .card.wide .h3 {
    font-size: 44px;
  }

  .cbody {
    padding: 26px 22px;
  }

  .steps {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 48px;
  }

  .json {
    font-size: 13px;
    padding: 22px 18px;
    overflow-x: auto;
  }

  .tl {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    margin-top: 48px;
  }

  .tl-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
}
