/*
 * Checkpoint Zero Forge — landing page.
 * The checkpointzero.net look (IBM Plex, zinc surfaces, big centred hero over a faint
 * grid, mono kickers, rounded cards, blue primary action), in the forge's tone: a
 * little closer to black and white than the main site.
 */
@font-face {
  font-family: Plex;
  src: url("plex-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Plex;
  src: url("plex-sans-600.woff2") format("woff2");
  font-weight: 500 900;
  font-display: swap;
}
@font-face {
  font-family: PlexMono;
  src: url("plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #070808;
  --surface: #0d0e0f;
  --surface-2: #121314;
  --secondary: #1b1d1f;
  --border: #24272a;
  --border-soft: #1a1c1e;
  --border-strong: #33363a;
  --fg: #f2f3f4;
  --fg-2: #c3c5c8;
  --muted: #94979c;
  --faint: #686b70;
  --blue: #2c80bb;
  --blue-hover: #3a8fca;
  --blue-soft: #7db6dc;
  --radius: 8px;
  --radius-lg: 12px;
  --sans: Plex, "IBM Plex Sans", system-ui, sans-serif;
  --mono: PlexMono, "IBM Plex Mono", ui-monospace, monospace;
  --page: min(1200px, 100% - 48px);
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.03em;
}
p {
  margin: 0;
}
:focus-visible {
  outline: 2px solid #2c80bbcc;
  outline-offset: 3px;
  border-radius: 4px;
}
::selection {
  background: #2c80bb55;
}
.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 8px 12px;
  border-radius: var(--radius);
  background: var(--fg);
  color: var(--bg);
  font-weight: 600;
}
.skip:focus {
  top: 12px;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition:
    background-color 0.15s,
    border-color 0.15s,
    color 0.15s,
    transform 0.15s;
}
.button:active {
  transform: translateY(1px);
}
.button.small {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
}
.button.large {
  height: 48px;
  padding: 0 28px;
  font-size: 15px;
}
.button.primary {
  background: var(--blue);
  border-color: #ffffff1a;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 1px 0 #ffffff1f inset;
}
.button.primary:hover {
  background: var(--blue-hover);
}
.button.outline {
  background: #ffffff06;
  color: var(--fg);
}
.button.outline:hover {
  background: #ffffff0d;
  border-color: var(--border-strong);
}
.button.ghost {
  border-color: transparent;
  color: var(--fg);
}
.button.ghost:hover {
  background: #ffffff0d;
}
.text-link {
  display: inline-flex;
  gap: 6px;
  color: var(--fg);
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 2px;
  transition: border-color 0.15s;
}
.text-link:hover {
  border-color: var(--fg);
}

/* ── Header ───────────────────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 57px;
  background: #070808f0;
  border-bottom: 1px solid var(--border-soft);
  backdrop-filter: blur(14px) saturate(1.2);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
  padding: 0 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.logo-tile {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 5px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition:
    border-color 0.3s,
    background-color 0.3s;
}
.logo-tile img {
  border-radius: 5px;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.logo-tile::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -50%;
  width: 33%;
  transform: skewX(-12deg);
  background: linear-gradient(90deg, transparent, #ffffff1f, transparent);
  opacity: 0;
  transition:
    translate 0.7s ease-out,
    opacity 0.7s;
}
.brand:hover .logo-tile {
  border-color: #ffffff33;
  background: #ffffff08;
}
.brand:hover .logo-tile img {
  transform: perspective(120px) rotateY(-16deg) rotateX(8deg) scale(1.06);
}
.brand:hover .logo-tile::after {
  translate: 480% 0;
  opacity: 1;
}
.logo-words {
  display: flex;
  flex-direction: column;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.logo-words > span:last-child {
  color: var(--muted);
  transition: color 0.3s;
}
.brand:hover .logo-words > span:last-child {
  color: var(--blue-soft);
}
.topnav {
  display: flex;
  gap: 2px;
}
.topnav a {
  padding: 6px 10px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  transition:
    color 0.15s,
    background-color 0.15s;
}
.topnav a:hover {
  background: #ffffff0a;
  color: var(--fg);
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  width: 240px;
  margin-left: auto;
  padding: 0 6px 0 10px;
  border: 1px solid var(--border);
  border-radius: 6.5px;
  background: #ffffff06;
  color: var(--muted);
  transition:
    border-color 0.15s,
    width 0.25s,
    box-shadow 0.15s;
}
.search:hover {
  border-color: var(--border-strong);
}
.search:focus-within {
  width: 300px;
  border-color: #2c80bbb3;
  background: #0c0d0e;
  box-shadow: 0 0 0 3px #2c80bb26;
}
.search svg {
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
}
.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--fg);
  font: 13px var(--sans);
  outline: none;
}
.search input::placeholder {
  color: var(--muted);
}
.search input::-webkit-search-cancel-button {
  display: none;
}
.search:focus-within {
  outline: none;
}
kbd {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  font: 10px var(--mono);
  color: var(--muted);
}
.search:focus-within kbd {
  opacity: 0;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(72px, 12vh, 128px) 24px 96px;
  text-align: center;
  overflow: hidden;
}
.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(50% 40% at 50% 0%, #2c80bb1c, transparent 70%),
    linear-gradient(#ffffff08 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, #ffffff08 1px, transparent 1px) 0 0 / 48px 48px;
  mask-image: radial-gradient(70% 70% at 50% 30%, #000 30%, transparent 75%);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid #ffffff1a;
  border-radius: 999px;
  background: #07080880;
  font: 400 11px/1.5 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ffffffb8;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 10px #2c80bbcc;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.45;
  }
}
.hero h1 {
  margin-top: 26px;
  font-size: clamp(48px, 8vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.025em;
}
.fade {
  background: linear-gradient(180deg, #f2f3f4 0%, #8f9296 110%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  max-width: 580px;
  margin-top: 24px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--fg-2);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}
.release-status {
  margin-top: 16px;
  font: 12px var(--mono);
  color: var(--muted);
}
.tags {
  margin-top: 28px;
  font: 11px var(--mono);
  letter-spacing: 0.2em;
  color: var(--faint);
}

/* ── Sections ─────────────────────────────────────────────────────────────── */
.section {
  width: var(--page);
  margin: 0 auto;
  padding: 72px 0;
  border-top: 1px solid var(--border-soft);
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}
.project-actions {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 10px;
}
.kicker {
  margin-bottom: 14px;
  font: 400 11px/1.5 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.section h2 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08;
}
.section-lede {
  max-width: 560px;
  margin-top: 14px;
  font-size: 16px;
  color: var(--muted);
}

/* Cards */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition:
    border-color 0.2s,
    background-color 0.2s,
    transform 0.2s;
}
a.card:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
  transform: translateY(-2px);
}
.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border: 1px solid #2c80bb59;
  border-radius: 6px;
  background: #2c80bb17;
  font: 10px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-soft);
}
.badge.quiet {
  border-color: var(--border);
  background: var(--secondary);
  color: var(--fg-2);
}

/* ZeroPad showcase: the app in a window, with corner ticks like a selected card */
.showcase {
  position: relative;
  margin: 0;
}
.showcase::before,
.showcase::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: #ffffff4d;
  border-style: solid;
  pointer-events: none;
}
.showcase::before {
  top: -7px;
  left: -7px;
  border-width: 1px 0 0 1px;
  border-top-left-radius: 6px;
}
.showcase::after {
  right: -7px;
  bottom: 34px;
  border-width: 0 1px 1px 0;
  border-bottom-right-radius: 6px;
}
.window {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow:
    0 40px 120px -60px #2c80bb40,
    0 30px 60px -40px #000;
}
.window-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 40px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.window-dots {
  display: flex;
  gap: 6px;
}
.window-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-strong);
}
.window-title {
  font: 10px var(--mono);
  letter-spacing: 0.18em;
  color: var(--muted);
}
.window-bar .badge {
  margin-left: auto;
}
.window img {
  width: 100%;
  transition: transform 0.6s ease;
}
.window a:hover img {
  transform: scale(1.006);
}
.showcase figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  font: 12px var(--mono);
  color: var(--faint);
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 40px;
}
.feature {
  display: flex;
  flex-direction: column;
  padding: 22px;
}
.feature:hover {
  border-color: var(--border-strong);
}
.feature-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--secondary);
  color: var(--fg);
}
.feature-icon svg,
.repo svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.feature h3 {
  margin-top: 18px;
  font-size: 18px;
}
.feature p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}
.meta {
  margin-top: auto;
  padding-top: 18px;
  font: 10px var(--mono);
  letter-spacing: 0.16em;
  color: var(--faint);
}

/* Repository catalogue */
.repos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.repo {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 150px;
  padding: 20px;
}
.repo-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.repo-owner {
  color: var(--muted);
  font-weight: 400;
}
.repo-description {
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.repo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: auto;
  padding-top: 10px;
  font: 12px var(--mono);
  color: var(--faint);
}
.repo-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lang i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fg-2);
}
.repo.skeleton {
  pointer-events: none;
}
.repo.skeleton span {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #ffffff08, #ffffff12, #ffffff08) 0 0 / 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

/* Support and contributing */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
}
.panel h2 {
  font-size: clamp(24px, 2.6vw, 30px);
}
.panel > p:not(.kicker):not(.fine-print) {
  color: var(--muted);
}
.panel .kicker {
  margin-bottom: 0;
}
.support-table {
  display: grid;
  grid-template-columns: 1fr auto;
  margin: 4px 0 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.support-table dt,
.support-table dd {
  margin: 0;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14px;
}
.support-table dd {
  display: flex;
  justify-content: flex-end;
}
.support-table dt:nth-last-of-type(1),
.support-table dd:nth-last-of-type(1) {
  border-bottom: 0;
}
.fine-print {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--faint);
}
.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
.link-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border-soft);
}
.link-list a {
  display: flex;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-soft);
  color: var(--fg-2);
  font-size: 14px;
  transition: color 0.15s;
}
.link-list a:hover {
  color: var(--fg);
}

/* Community band */
.community {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  align-items: center;
  padding: 40px;
  border: 1px solid var(--border);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  background: var(--surface);
}
/* A hairline of blue across the top edge, nothing behind the words */
.community::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    #2c80bb99 30%,
    #7db6dc 50%,
    #2c80bb99 70%,
    transparent
  );
}
.community h2 {
  font-size: clamp(28px, 3.6vw, 40px);
}
.community p:not(.kicker) {
  max-width: 520px;
  margin-top: 14px;
  color: var(--fg-2);
}
.community-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.community-links .button {
  align-self: flex-start;
}
.community-links nav {
  border-top: 1px solid var(--border);
}
.community-links nav a {
  display: flex;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  color: var(--fg-2);
  font-size: 14px;
  transition: color 0.15s;
}
.community-links nav a:hover {
  color: #fff;
}
.community-links nav a span {
  color: var(--blue-soft);
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.footer {
  margin-top: 40px;
  border-top: 1px solid var(--border-soft);
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr repeat(2, 1fr);
  gap: 32px;
  width: var(--page);
  margin: 0 auto;
  padding: 48px 0 36px;
}
.footer-brand p {
  margin-top: 14px;
  max-width: 280px;
  color: var(--muted);
  font-size: 14px;
}
.footer nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer h3 {
  margin-bottom: 6px;
  font: 400 11px/1.5 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}
.footer nav a {
  color: var(--muted);
  font-size: 14px;
  transition: color 0.15s;
}
.footer nav a:hover {
  color: var(--fg);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: var(--page);
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid var(--border-soft);
  font: 11px var(--mono);
  letter-spacing: 0.12em;
  color: var(--fg-2);
}
.dim {
  color: var(--faint);
}

/* ── Smaller screens ──────────────────────────────────────────────────────── */
@media (max-width: 1020px) {
  .topnav {
    display: none;
  }
  .features {
    grid-template-columns: 1fr;
  }
  .split,
  .community {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  :root {
    --page: calc(100% - 32px);
  }
  .search {
    display: none;
  }
  .topbar-inner {
    justify-content: space-between;
  }
  .hero {
    padding: 64px 16px 72px;
  }
  .lede {
    font-size: 16px;
  }
  .actions {
    flex-direction: column;
    align-self: stretch;
  }
  .section {
    padding: 56px 0;
  }
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .showcase figcaption {
    flex-direction: column;
    gap: 4px;
  }
  .panel,
  .community {
    padding: 22px;
  }
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
