/* COMMIT · one mono at one size, one block-built wordmark, one blue.
   Ramp (#111 → blue in five steps) is used wherever pixels appear. */
@font-face {
  font-family: 'JetBrains Mono NL'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('assets/fonts/JetBrainsMonoNL-Regular.woff2') format('woff2');
}
:root {
  --bg: #EDEDEB; --card: #F6F6F4; --ink: #111111; --grey: #5A5A5A; --empty: #DCDCD9;
  --r1: #111111; --r2: #0D1E4C; --r3: #092C88; --r4: #0439C3; --blue: #0047FF;
  --on-blue: #FFFFFF; --on-blue-dim: rgba(255, 255, 255, .62);
  --m: 48px;              /* page margin */
  --fs: 12px;             /* the one text size */
  --b: 19px;              /* wordmark block, set by main.js */
  --pw: 330px; --ph: 660px; --pb: 9px;   /* phone width, height, pixel frame, set by main.js */
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); overflow-x: clip; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--ink); overflow-x: clip;
  font: 400 var(--fs)/1.35 'JetBrains Mono NL', 'JetBrains Mono', 'Space Mono', ui-monospace, monospace;
  letter-spacing: .02em; text-transform: uppercase; font-variant-ligatures: none;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: var(--bg); padding: 9px 12px; }
.skip:focus { top: 12px; }
.dim { color: var(--grey); }

/* ── primitives ───────────────────────────── */
.hair { display: block; height: 1px; background: var(--ink); transform-origin: 0 50%; }
.block { max-width: 300px; }
.list li::before { content: "• "; }
.btn { display: inline-block; padding: 9px 12px 8px; border: 1px solid var(--ink); white-space: nowrap; }
.btn--fill { background: var(--ink); color: var(--bg); }
.btn--line { background: transparent; }
.chip { background: var(--blue); color: var(--on-blue); padding: 3px 8px 2px; }
.ico { display: inline-block; width: .9em; height: .9em; vertical-align: -.08em; fill: currentColor; shape-rendering: crispEdges; }
.meta { display: flex; justify-content: space-between; gap: 24px; padding: 0 0 20px; }
.meta + .hair { margin-bottom: 40px; }
.counter { color: var(--grey); }
.kicker { color: var(--grey); }

/* label strip: one short sentence spread across the full width */
.strip { width: 100%; }
.strip__words { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 16px; }
.strip--top .strip__words { padding: 0 0 16px; }
.strip--top .hair { margin-bottom: 0; }

/* ── sections ─────────────────────────────── */
.sec { position: relative; min-height: 100vh; padding: 40px var(--m) 48px; }
.sec + .sec { border-top: 0; }

/* the fixed phone lane: content stays clear of the phone on desktop */
.has-phone :is(.flow, .morph, .feed__grid, .project__grid, .acts, .who, .orbit) { max-width: calc(100% - var(--pw) - 72px); }
.phone-slot { display: none; }

/* 01 hero */
.sec--hero { display: flex; flex-direction: column; padding-top: 24px; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; }
.nav__menu { display: none; }
.hair--nav { margin: 0 0 32px; }
.sec--hero .meta { padding-bottom: 0; }
.hero__stage { position: relative; margin-top: clamp(48px, 13vh, 140px); }
.wm { display: block; line-height: 0; }
.wm svg { display: block; overflow: visible; shape-rendering: crispEdges; }
.wm rect { transform-box: fill-box; }
.hero__link { position: absolute; left: calc(var(--wmw, 900px) + var(--b) * 7); right: 0; top: 0; height: 100%; pointer-events: none; }
.hero__link .hair { position: absolute; left: 0; right: 0; top: 24%; }
.hero__link .hair--low { top: 82%; }
.hero__link .amp { position: absolute; left: 0; top: 24%; transform: translateY(-120%); }
.card { position: relative; padding: 16px 18px; }
.card--blue { background: var(--blue); color: var(--on-blue); }
.card__row { display: flex; justify-content: space-between; gap: 12px; }
.card__row--end { margin-top: 28px; }
.card p { margin-top: 14px; }
.card--hero { position: absolute; right: 0; top: calc(var(--b) * -6); width: clamp(220px, 19vw, 280px); transform: rotate(7deg); z-index: 3; }
.card--hero .cover { margin-top: 14px; }
.hero__copy { margin-top: clamp(40px, 7vh, 72px); display: grid; gap: 22px; justify-items: start; }
.actions { display: flex; gap: 14px; flex-wrap: wrap; }
.sec--hero .strip { margin-top: auto; padding-top: 40px; }

/* round badge with running text */
.badge { position: absolute; width: 132px; height: 132px; display: grid; place-items: center; z-index: 4; }
.badge__ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.badge__ring text { font: 400 10.5px 'JetBrains Mono NL', monospace; letter-spacing: .1em; fill: var(--ink); }
.badge__ring::before { content: none; }
.badge::before { content: ""; position: absolute; inset: 0; border: 1px solid var(--ink); border-radius: 50%; }
.badge__core { position: relative; width: 40px; height: 40px; background: var(--ink); display: grid; place-items: center; color: var(--on-blue); }
.badge__core--blue { background: var(--blue); }
.badge__core .ico { width: 18px; height: 18px; }
.badge--hero { right: calc(var(--m) + 24px); bottom: 104px; }

/* covers: pixel art and code windows */
.cover { display: block; width: 100%; }
.cover svg { display: block; width: 100%; height: auto; shape-rendering: crispEdges; }
.cover--code { background: var(--ink); aspect-ratio: 16 / 9; position: relative; overflow: hidden; }
.cover--code svg { position: absolute; inset: 0; height: 100%; }

/* 02 problem */
.sec--problem { display: flex; flex-direction: column; }
.problems { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: auto; margin-bottom: 18vh; }

/* 03 how it works */
.flow { position: relative; display: flex; align-items: flex-start; gap: 0; height: 132px; margin-bottom: 56px; }
.flow__lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.flow__lines path { fill: none; stroke: var(--ink); stroke-width: 1; }
.flow__step { position: absolute; background: var(--bg); }
.flow__step.btn--fill { background: var(--ink); }
.flow__step:nth-of-type(1) { left: 0; top: 0; }
.flow__step:nth-of-type(2) { left: 36%; top: 48px; }
.flow__step:nth-of-type(3) { right: 0; top: 96px; }
.morph { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 28px; align-items: center; }
.morph__arrow { font-size: var(--fs); }
.readme { border: 1px solid var(--ink); background: var(--card); padding: 14px 16px; }
.readme__head { display: flex; justify-content: space-between; color: var(--grey); padding-bottom: 12px; border-bottom: 1px solid var(--ink); margin-bottom: 12px; }
.readme__body { display: grid; gap: 7px; }
.readme__body i { display: block; height: 6px; background: #B9B9B5; transform-origin: 0 50%; }
.readme__body i.h { background: var(--grey); height: 8px; margin-top: 6px; }
.post { border: 1px solid var(--ink); background: var(--card); padding: 14px 16px; display: grid; gap: 12px; }
.post__head { display: flex; justify-content: space-between; gap: 12px; }
.post__acts { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }

/* 04 feed + launch day */
.sec--feed { height: 260vh; padding: 0; }
.sec--feed .sticky { position: sticky; top: 0; height: 100vh; padding: 40px var(--m) 48px; overflow: hidden; }
.feed__grid { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 48px; }
.feed__copy { display: grid; gap: 20px; align-content: start; }
.board__head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.board__list { position: relative; height: calc(6 * 80px); }
.board__row { position: absolute; left: 0; right: 0; top: 0; height: 80px; display: grid; grid-template-columns: 34px 56px minmax(0, 1fr) 56px; gap: 16px; align-items: center; border-bottom: 1px solid var(--ink); background: var(--bg); will-change: transform; }
.board__row .cover { width: 56px; }
.board__row p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vote { width: 56px; height: 56px; border: 1px solid var(--ink); display: grid; place-content: center; text-align: center; line-height: 1.5; }
.board__row.is-top .vote { background: var(--blue); color: var(--on-blue); border-color: var(--blue); }

/* 05 project page */
.project__grid { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 48px; align-items: start; }
.diff { border: 1px solid var(--ink); background: var(--card); padding: 14px 16px; display: grid; gap: 14px; }
.diff__code { font: inherit; white-space: pre; overflow-x: auto; line-height: 1.6; }
.ln { display: block; position: relative; }
.ln--hit { background: var(--blue); color: var(--on-blue); margin: 0 -16px; padding: 0 16px; }
.ln--del { color: var(--grey); }
.react { position: absolute; right: 16px; top: 0; }
.thread { display: grid; gap: 12px; border-top: 1px solid var(--ink); padding-top: 14px; }
.thread p { max-width: 360px; }

/* 06 upvote, follow, fork */
.acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 8vh; }
.act { display: grid; gap: 24px; align-content: start; }
.act__word { padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.act__fx { height: 96px; display: flex; align-items: center; position: relative; }
.stamp { display: flex; align-items: center; gap: 14px; }
.stamp__box { width: 56px; height: 56px; display: grid; place-items: center; background: var(--blue); color: var(--on-blue); }
.follow { position: relative; min-width: 150px; text-align: center; }
.follow.is-on { background: var(--blue); border-color: var(--blue); color: var(--on-blue); }
.burst { position: absolute; width: 10px; height: 10px; pointer-events: none; z-index: 5; }
.forkline { width: 100%; max-width: 260px; height: auto; overflow: visible; }
.forkline path { fill: none; stroke: var(--ink); stroke-width: 1; }
.forkline__branch { stroke: var(--blue) !important; }
.forkline__dot { fill: var(--ink); shape-rendering: crispEdges; }

/* 07 who it's for */
.sec--who { display: flex; flex-direction: column; }
.who { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }
.who__col { display: grid; gap: 14px; align-content: start; }
.who__col > p:first-child { padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.orbit { position: relative; flex: 1; min-height: 340px; margin-top: 24px; }
.orb { position: absolute; left: 0; top: 0; width: 148px; border: 1px solid var(--ink); background: var(--card); padding: 8px; display: grid; gap: 6px; will-change: transform; }
.orb .cover { width: 100%; }

/* 08 start */
.sec--start { display: flex; flex-direction: column; overflow: hidden; }
.final { position: relative; margin-top: 4vh; }
.final__row { position: relative; }
.final__row--b { margin-left: calc(var(--b) * 27); margin-top: calc(var(--b) * -1.5); }
.final__line--a { position: absolute; left: calc(var(--b) * 27); right: 0; top: calc(var(--b) * 4.8); }
.final__amp { position: absolute; right: 0; top: calc(var(--b) * 4.8); transform: translateY(-120%); }
.final__meta { display: flex; align-items: center; gap: 24px; margin-top: 12px; width: calc(var(--b) * 25); }
.final__meta .hair { flex: 1; }
.final__line--c { position: absolute; left: var(--m); width: 22%; top: 66%; }
.card--start { position: absolute; left: 20%; top: 50%; width: clamp(240px, 21vw, 300px); min-height: 250px; transform: rotate(-5deg); display: flex; flex-direction: column; justify-content: space-between; z-index: 3; }
.card--start p { margin-top: 0; max-width: 20ch; }
.card__btn { border-bottom: 1px solid currentColor; }
.badge--start { right: calc(var(--m) + 72px); top: 62%; }
.strip--foot { margin-top: auto; }
.strip--foot a:hover { color: var(--blue); }

/* ── the phone ────────────────────────────── */
.phone {
  position: fixed; z-index: 30; right: var(--m); top: 50%; width: var(--pw); height: var(--ph);
  margin-top: calc(var(--ph) / -2); border: var(--pb) solid var(--ink); background: var(--card);
  opacity: 0; visibility: hidden; pointer-events: none;
}
.phone__screen { position: absolute; inset: 0; overflow: hidden; }
.scr { position: absolute; inset: 0; padding: 12px 12px 0; display: flex; flex-direction: column; gap: 12px; background: var(--card); }
.scr__bar { display: flex; justify-content: space-between; gap: 8px; }
.scr__vp { flex: 1; min-height: 0; overflow: hidden; }
.scr__scroll { display: flex; flex-direction: column; gap: 14px; will-change: transform; }
.stories { display: flex; gap: 6px; }
.stories .cover { width: 40px; padding: 2px; border: 2px solid var(--ink); }
.stories .cover.is-new { border-color: var(--blue); }
.fpost { display: grid; gap: 8px; border-top: 1px solid var(--ink); padding-top: 12px; position: relative; }
.fpost .cover--code { aspect-ratio: 16 / 10; }
.fpost__acts { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.fpost__acts .tr { margin-left: auto; }
.rcard { border: 1px solid var(--ink); padding: 10px; background: var(--bg); display: grid; gap: 8px; }
.rcard i { display: block; height: 5px; background: #B9B9B5; }
.rcard i:nth-child(3n) { width: 62%; }
.prof { display: grid; gap: 10px; }
.prof__head { display: flex; gap: 10px; align-items: center; }
.prof__head .cover { width: 44px; flex: none; }
.graph svg { display: block; width: 100%; height: auto; shape-rendering: crispEdges; }
.phone__marker { position: absolute; right: calc(var(--pb) * -2); top: 0; width: var(--pb); height: calc(var(--pb) * 3); background: var(--blue); }

/* inline phones (phones and reduced motion) */
.phone--inline { position: relative; inset: auto; margin: 32px auto 0; right: auto; top: auto; opacity: 1; visibility: visible; pointer-events: auto; width: min(330px, 100%); height: 600px; }

/* ── canvas, cursor trail, menu ───────────── */
/* the pixels live behind the page; frosted glass panels blur them where text sits */
.fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
main { position: relative; z-index: 1; }
.trail i { position: fixed; left: 0; top: 0; width: 12px; height: 12px; z-index: 90; pointer-events: none; opacity: 0; will-change: transform; }
.trail.is-on i { opacity: 1; }
.menu { position: fixed; inset: 0; z-index: 120; background: var(--blue); color: var(--on-blue); display: grid; place-items: center; }
.menu[hidden] { display: none; }
.menu__close { position: absolute; right: 16px; top: 18px; color: var(--on-blue); }
.menu__list { display: grid; gap: 22px; justify-items: center; }
.menu__list a { transition: opacity .3s; }
.menu__list:hover a, .menu__list a[aria-current] { opacity: .5; }
.menu__list a:hover { opacity: 1; }

/* ── laptops ──────────────────────────────── */
@media (max-width: 1240px) {
  .has-phone .feed__grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .has-phone .feed__copy .list { display: none; }
  .has-phone .project__grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .has-phone .acts { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 0; }
  .has-phone .act { grid-template-columns: 110px minmax(0, 220px) minmax(0, 1fr); align-items: center; gap: 16px; }
  .has-phone .act__fx { height: 72px; }
  .has-phone .who { gap: 24px; }
}

/* ── phones ───────────────────────────────── */
@media (max-width: 899px) {
  :root { --m: 16px; --fs: 11px; }
  .sec { min-height: auto; padding: 32px var(--m) 56px; }
  .sec--hero { min-height: 100svh; padding-top: 12px; }
  .nav__link, .nav__cta { display: none; }
  .nav__menu { display: inline-block; }
  .hair--nav { margin-bottom: 20px; }
  .hero__stage { margin-top: 64px; }
  .hero__link { display: none; }
  .card--hero { position: relative; right: auto; top: auto; margin: 40px 0 0 auto; width: 62%; transform: rotate(5deg); }
  .badge { width: 104px; height: 104px; }
  .badge--hero { position: relative; right: auto; bottom: auto; align-self: flex-end; margin-top: 28px; }
  .orb { width: 118px; }
  .orbit { min-height: 440px; }
  .badge__ring text { font-size: 12px; }
  .problems { grid-template-columns: minmax(0, 1fr); gap: 18px; margin: 32px 0 0; }
  .flow { height: 150px; }
  .flow__step:nth-of-type(2) { left: 18%; top: 52px; }
  .flow__step:nth-of-type(3) { right: 0; top: 104px; }
  .morph { grid-template-columns: minmax(0, 1fr); }
  .morph__arrow { transform: rotate(90deg); justify-self: center; }
  .sec--feed { height: auto; }
  .sec--feed .sticky { position: relative; height: auto; padding: 32px var(--m) 56px; }
  .feed__grid, .project__grid, .who { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .board__row { grid-template-columns: 22px 44px minmax(0, 1fr) 48px; gap: 10px; }
  .board__row .cover { width: 44px; }
  .vote { width: 48px; height: 48px; }
  .acts { grid-template-columns: minmax(0, 1fr); }
  .sec--start { min-height: 100svh; }
  .final__row--b { margin-left: calc(var(--b) * 14); margin-top: calc(var(--b) * 1.5); }
  .final__line--a, .final__amp, .final__line--c { display: none; }
  .final__meta { width: auto; }
  .card--start { position: relative; left: auto; top: auto; margin: 48px 0 0 4%; width: 78%; min-height: 200px; }
  .badge--start { position: relative; right: auto; top: auto; margin: 32px 0 0 auto; }
  .strip--foot { margin-top: 40px; }
  .strip__words { justify-content: flex-start; gap: 8px 18px; }
}
@media (max-width: 899px), (prefers-reduced-motion: reduce) {
  .phone-slot { display: block; }
  .sec--feed .phone-slot { margin-top: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .sec--feed { height: auto; }
  .sec--feed .sticky { position: relative; height: auto; }
  .trail { display: none; }
}

/* 02: big type on frosted glass; the pixel rain stays sharp around it and blurs behind it */
.glass {
  background: rgba(246, 246, 244, .38);
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 -1px 0 rgba(0, 71, 255, .08), 0 12px 40px rgba(0, 71, 255, .10);
}
.sec--problem .strip--top { margin-top: 6vh; padding: 30px 40px; border-radius: 32px; }
.sec--problem .strip--top .hair { display: none; }
.sec--problem .strip--top .strip__words { font-size: clamp(26px, 3.6vw, 56px); line-height: 1.05; letter-spacing: -.01em; padding: 0; gap: .2em .5em; }
.sec--problem .problems { padding: 26px 48px; border-radius: 999px; gap: 40px; align-items: center; }
.sec--problem .problems .block { font-size: clamp(14px, 1.1vw, 16px); line-height: 1.4; max-width: 340px; }
@media (max-width: 899px) {
  .sec--problem .strip--top { padding: 22px 20px; border-radius: 24px; }
  .sec--problem .strip--top .strip__words { justify-content: flex-start; font-size: clamp(30px, 9vw, 44px); }
  .sec--problem .problems { border-radius: 24px; padding: 22px 20px; gap: 16px; }
}
