@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/geist-latin.woff2") format("woff2");
}

/* T3 Code. A stack of panels on one margin and one radius scale.
   The field of filings lives inside two of them: the stage and the closing panel. */

:root {
  --bg: #080808;
  --panel: #101010;
  --black: #000;
  --ivory: #edebe5;
  --fg: #edebe5;
  --muted: #8f8d86;
  --dim: #5c5b56;
  --line: rgba(237, 235, 229, 0.08);

  --sans: "Geist", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  --m: 32px;          /* page margin, also the gap above the first panel's text */
  --gap: 16px;        /* gap between panels */
  --r-lg: 18px;       /* every panel */
  --r-md: 12px;       /* the app window inside the stage */
  --r-sm: 9px;        /* buttons */

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.5 var(--sans);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; letter-spacing: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a, button { outline: none; -webkit-tap-highlight-color: transparent; }
::selection { background: var(--ivory); color: var(--bg); }

h1, h2, h3 { font-weight: 500; text-wrap: balance; }
h1 { font-size: clamp(40px, 4.6vw, 66px); line-height: 1.04; letter-spacing: -0.045em; }
h2 { font-size: clamp(36px, 4vw, 58px); line-height: 1.04; letter-spacing: -0.045em; }
h3 { font-size: 24px; line-height: 1.18; letter-spacing: -0.03em; }
.lead { color: var(--muted); font-size: 19px; line-height: 1.5; letter-spacing: -0.015em; text-wrap: pretty; }
.fine { color: var(--dim); font-size: 13px; }

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 18px;
  background: var(--ivory); color: #0b0b0a;
  border-radius: var(--r-sm);
  font-weight: 500; font-size: 15px;
  white-space: nowrap;
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
}
.btn:active { transform: scale(0.97); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 14px; border-radius: 8px; }
.btn-lg { height: 50px; padding: 0 22px; font-size: 16px; }
.txt { color: var(--fg); font-weight: 500; opacity: 0.72; transition: opacity 200ms ease; }
p .txt, dd .txt { opacity: 1; color: var(--fg); }
.ctas { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 28px; margin-top: 32px; font-size: 15px; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: #fff; }
  .txt:hover { opacity: 1; }
}

/* ---------- Bar ---------- */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  height: 64px; padding: 0 var(--m);
  display: flex; align-items: center; justify-content: space-between;
  transition: background-color 300ms ease, box-shadow 300ms ease;
}
.bar.scrolled {
  background: rgba(8, 8, 8, 0.8);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 1px 0 var(--line);
}
.mark { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; letter-spacing: -0.02em; }
.mark img { border-radius: 5px; }
.bar-end { display: flex; align-items: center; gap: 22px; }
.gh { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; transition: color 200ms ease; }
@media (hover: hover) and (pointer: fine) { .gh:hover { color: var(--fg); } }

/* ---------- Intro ---------- */
.intro { padding: 152px var(--m) 64px; }
.intro h1 { max-width: 15ch; }
.intro .lead { margin-top: 22px; max-width: 30em; }

/* ---------- Panels share one frame ---------- */
.stage, .closing { margin: 0 var(--m); }
.closing { margin-top: var(--gap); }
.field { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ---------- Stage ---------- */
.stage {
  position: relative; overflow: hidden;
  height: clamp(560px, 58vw, 880px);
  background: var(--black);
  border-radius: var(--r-lg);
  box-shadow: inset 0 0 0 1px var(--line);
  isolation: isolate;
}
.app {
  position: absolute; z-index: 2;
  left: 40%; top: 17%;
  width: 80%;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(237, 235, 229, 0.12),
    0 40px 100px -20px rgba(0, 0, 0, 0.9),
    -40px 0 120px rgba(0, 0, 0, 0.6);
}
.app img { width: 100%; }
.works {
  position: absolute; z-index: 3; left: 40px; bottom: 34px;
  max-width: 30ch;
  font-size: 15px; line-height: 1.6; color: var(--dim);
}
.works button { color: var(--muted); transition: color 200ms ease; }
.works button.on { color: var(--fg); }
.stage .field { cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .works button:hover { color: var(--fg); } }

/* Entrance: the app rises into place once, the field resolves behind it */
/* Entrance, in order: headline words, then the line under it, the buttons,
   the app, and last the field. Transform and opacity only. */
.js .app {
  opacity: 0; transform: translate3d(0, 36px, 0) scale(0.97);
  transition: opacity 1000ms var(--ease-out) 420ms, transform 1200ms var(--ease-out) 420ms;
  will-change: transform, opacity;
}
.js .stage.in .app { opacity: 1; transform: none; }
.js .intro > :not(h1) { opacity: 0; transform: translate3d(0, 14px, 0); transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out); }
.js .intro.in > :not(h1) { opacity: 1; transform: none; }
.js .intro.in > :nth-child(2) { transition-delay: 240ms; }
.js .intro.in > :nth-child(3) { transition-delay: 320ms; }
.js .field { opacity: 0; transition: opacity 900ms var(--ease-out); }
/* headlines stay hidden until they are split into words, so they never flash */
.js .intro h1:not(.split), .js .panel h3:not(.split), .js .closing h2:not(.split), .js .hcol-title h2:not(.split) { visibility: hidden; }
.js .field.on { opacity: 1; }

/* Word reveal: each word rises out of its own mask, 40 ms apart */
/* Soft cascade: words fade up out of a light blur, 30 ms apart.
   No masks, so there are no hard edges to read as choppy. */
.split .w { display: inline-block; }
.split .w > span {
  display: inline-block;
  opacity: 0; filter: blur(8px); transform: translate3d(0, 0.28em, 0);
  transition: opacity 700ms var(--ease-out), filter 800ms var(--ease-out), transform 1000ms var(--ease-out);
  transition-delay: calc(var(--i) * 30ms);
}
.intro.in .split .w > span, .in .split .w > span, .in.split .w > span { opacity: 1; filter: blur(0); transform: none; }
.panel.rv .panel-copy p, .panel.rv .mini-pr, .panel.rv .mini-repo, .panel.rv .stack, .panel.rv .places, .panel.rv .crop {
  opacity: 0; transform: translateY(12px);
  transition: opacity 700ms var(--ease-out) 220ms, transform 700ms var(--ease-out) 220ms;
}
.panel.rv.in .panel-copy p, .panel.rv.in .mini-pr, .panel.rv.in .mini-repo, .panel.rv.in .stack, .panel.rv.in .places, .panel.rv.in .crop { opacity: 1; transform: none; }
.panel.rv.in .mini-pr, .panel.rv.in .mini-repo, .panel.rv.in .stack, .panel.rv.in .places, .panel.rv.in .crop { transition-delay: 300ms; }

/* Morphing button */
#prBtn { transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease, width 320ms var(--ease-out); overflow: hidden; }
#prBtn .label { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
#prBtn svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#prBtn .spin { animation: spin 600ms linear infinite; }
#prBtn .spin circle { stroke-dasharray: 26 12; }
#prBtn .check path { stroke-dasharray: 16; stroke-dashoffset: 16; animation: draw 360ms var(--ease-out) 120ms forwards; }
#prBtn.busy { pointer-events: none; }
#prBtn.done { background: #7fd78a; color: #08130a; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Panels: three masonry columns, flush top and bottom ---------- */
.panels {
  margin: var(--gap) var(--m) 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap);
  align-items: stretch;
}
.col { display: flex; flex-direction: column; gap: var(--gap); }
.col > .panel:last-child { flex: 1; }        /* the last panel in each column absorbs the difference */

.panel {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--panel);
  border-radius: var(--r-lg);
  padding: 32px;
  box-shadow: inset 0 0 0 1px rgba(237, 235, 229, 0.05);
  display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
}
.panel-black { background: var(--black); box-shadow: inset 0 0 0 1px var(--line); }
.panel-copy { position: relative; z-index: 2; }

/* Type inside panels: two steps for copy, two for the mini cards */
.panel h3 { font-size: 24px; line-height: 1.16; font-weight: 500; letter-spacing: -0.035em; }
.panel p { margin-top: 8px; color: var(--muted); font-size: 16px; line-height: 1.5; letter-spacing: -0.012em; max-width: 30ch; }

.p-lineage { padding-bottom: 0; gap: 0; }
.p-threads { padding-bottom: 0; gap: 0; }

/* mini cards: PR and repo */
.mini-pr, .mini-repo {
  background: #171717; border-radius: 12px; padding: 18px;
  box-shadow: inset 0 0 0 1px rgba(237, 235, 229, 0.06);
}
.mini-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.mini-branch { font-size: 15px; font-weight: 500; letter-spacing: -0.015em; }
.mini-delta, .mini-meta { display: flex; gap: 10px; font-size: 14px; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.mini-meta { color: var(--muted); }
.mini-delta em { font-style: normal; }
.add { color: #7fd78a; }
.del { color: #f08a7c; }
.mini-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; }
.mini-state { font-size: 14px; color: var(--muted); letter-spacing: -0.01em; transition: filter 200ms ease, opacity 200ms ease, color 200ms ease; }
.mini-state.ok { color: #7fd78a; }
.blur { filter: blur(2px); opacity: 0.5; }
.btn .label { display: inline-block; transition: filter 200ms ease, opacity 200ms ease; }
.btn[disabled] { opacity: 0.7; cursor: default; transform: none; }
.btn-ghost { background: rgba(237, 235, 229, 0.08); color: var(--fg); }
@media (hover: hover) and (pointer: fine) { .btn-ghost:hover { background: rgba(237, 235, 229, 0.14); } }

/* places */
.places { display: grid; gap: 12px; font-size: 15px; }
.places div { display: grid; grid-template-columns: 88px 1fr; }
.places dt { color: var(--dim); }
.places dd { color: var(--muted); }

/* crops of the real app */
.crop { position: relative; overflow: hidden; }
.crop img { position: absolute; max-width: none; height: auto; }
.crop-lineage {
  width: 372px; height: 470px; margin: 24px auto 0; flex: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 90%, transparent);
          mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 90%, transparent);
}
.crop-lineage img { width: 1920px; left: -1531px; top: -150px; }
.crop-threads {
  width: 296px; height: 400px; margin: 24px auto 0; flex: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 82%, transparent);
          mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 82%, transparent);
}
.crop-threads img { width: 1700px; left: 0; top: -40px; }

/* voices: a feed of three real posts */
.p-voices { justify-content: flex-start; }
.stack { --card-h: 124px; --cards: 3; position: relative; list-style: none; height: calc(var(--card-h) * var(--cards) + 12px * (var(--cards) - 1)); }
.card {
  position: absolute; left: 0; right: 0; top: 0;
  height: var(--card-h);
  padding: 16px 18px;
  background: #1a1a1a;
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(237, 235, 229, 0.06);
  transform-origin: 50% 100%;
  transition: transform 400ms ease, opacity 400ms ease, filter 400ms ease;
  will-change: transform;
}
.card.no-t { transition: none; }
.card-head { display: flex; align-items: center; gap: 10px; font-size: 14px; letter-spacing: -0.01em; }
.card-head img, .card-head .fallback { width: 26px; height: 26px; border-radius: 50%; background: #262626; flex: none; }
.card-head .fallback { display: grid; place-items: center; font-size: 12px; color: var(--muted); }
.card-head b { font-weight: 500; }
.card-head span:last-child { color: var(--dim); }
.card p { margin-top: 10px; font-size: 15px; line-height: 1.45; color: #d6d4cd; max-width: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-wrap: pretty; }

/* ---------- Closing ---------- */
.closing {
  position: relative; overflow: hidden;
  height: clamp(520px, 46vw, 700px);
  background: var(--black);
  border-radius: var(--r-lg);
  box-shadow: inset 0 0 0 1px var(--line);
}
.closing::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(90% 80% at 0% 100%, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 40%, transparent 65%);
}
.closing-copy { position: absolute; z-index: 2; left: 48px; bottom: 48px; max-width: 620px; }
.closing .lead { margin-top: 16px; }

/* ---------- Footer ---------- */
.foot {
  margin-top: 96px;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  box-shadow: 0 -1px 0 var(--line);
  font-size: 14px;
}
.foot > * { padding: 32px var(--m) 48px; }
.foot > * + * { box-shadow: -1px 0 0 var(--line); }
.foot-brand img { border-radius: 7px; margin-bottom: 20px; }
.foot-brand p:not(.fine) { color: var(--fg); max-width: 26ch; }
.foot-brand .fine { margin-top: 8px; }
.foot-col h4 { font-size: 13px; font-weight: 500; color: var(--dim); margin-bottom: 14px; }
.foot-col a { display: block; color: var(--muted); margin-bottom: 8px; transition: color 200ms ease; }
@media (hover: hover) and (pointer: fine) { .foot-col a:hover { color: var(--fg); } }

/* ---------- Reveal ---------- */
.js .rv { opacity: 0; transform: translateY(24px) scale(0.985); transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out); }
.js .rv.in { opacity: 1; transform: none; }
.col:nth-child(2) .panel { transition-delay: 60ms; }
.col:nth-child(3) .panel { transition-delay: 120ms; }

/* ---------- Responsive ---------- */
@media (max-width: 1068px) {
  .panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .col:nth-child(3) { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  :root { --m: 16px; --gap: 12px; }
  .bar { padding: 0 20px; }
  .gh { display: none; }
  .intro { padding: 120px 20px 44px; }
  .stage { height: 640px; }
  .app { left: 20px; right: auto; top: auto; bottom: -40px; width: 170%; }
  .works { left: 24px; right: 24px; top: 24px; bottom: auto; max-width: none; }
  .panels { grid-template-columns: 1fr; }
  .col:nth-child(3) { grid-column: auto; display: flex; }
  .crop-lineage, .crop-threads { zoom: 0.8; }
  .panel { padding: 26px 24px; }
  .closing { height: 560px; }
  .closing-copy { left: 24px; right: 24px; bottom: 28px; }
  .foot { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .foot > * + * { box-shadow: 0 -1px 0 var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv, .js .intro > *, .js .app { transform: none !important; filter: none !important; transition: opacity 200ms ease !important; }
  .js .field { opacity: 1; transition: none; }
  .split .w > span { transform: none !important; filter: none !important; transition: opacity 300ms ease !important; }
  .panel.rv .panel-copy p, .panel.rv .mini-pr, .panel.rv .mini-repo, .panel.rv .stack, .panel.rv .places, .panel.rv .crop { transform: none !important; }
}

/* Small screens: keep text off the busiest part of the field */
@media (max-width: 860px) {
  .stage::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 150px; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0)); }
  .closing::after { background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.9) 55%, #000 100%); }
}
