/* nublock.co -- the collective's homepage. One narrow column under a big
   wordmark, project rows, and a fixed footer bar. */

@font-face {
  font-family: "Satoshi";
  src: url("fonts/Satoshi-Variable.woff2") format("woff2"),
       url("fonts/Satoshi-Variable.woff") format("woff");
  font-weight: 300 900; font-style: normal; font-display: swap;
}

:root {
  --bg: #000;
  --ink: #fff;
  --muted: #fff;
  --faint: #fff;
  --sans: "Satoshi", ui-sans-serif, system-ui, sans-serif;
  --serif: "Fraunces", "Cooper Black", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/24px var(--sans);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}
::selection { background: #1e3a8a; color: #fff; }
a { color: inherit; }
img { display: block; max-width: 100%; }

/* the character field either side of the column, behind everything */
#field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* ---------- wordmark ---------- */
.mark {
  margin: 0;
  padding: clamp(56px, 9vw, 120px) 16px clamp(48px, 8vw, 104px);
  text-align: center;
  font-family: var(--serif);
  font-weight: 900;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
  font-size: clamp(76px, 19vw, 300px);
  line-height: 0.9;
  letter-spacing: -0.045em;
  user-select: none;
}
/* the hex Nu mark, tinted by the wordmark's colour */
.mark i {
  display: inline-block;
  width: 0.86em; height: 0.86em;
  margin-right: 0.04em;
  vertical-align: -0.1em;
  background: currentColor;
  -webkit-mask: url("nu-mark.svg") center / contain no-repeat;
          mask: url("nu-mark.svg") center / contain no-repeat;
}

.mark a { color: inherit; text-decoration: none; }

/* ---------- column ---------- */
.col { max-width: 500px; margin: 0 auto; padding: 0 24px 160px; }
.col p { margin: 16px 0 0; font-size: 14px; line-height: 20px; color: var(--muted); }
.col p a { color: var(--ink); text-decoration: underline dotted; text-underline-offset: 3px; }
.col p a:hover { text-decoration-style: solid; }

h1 { margin: 0 0 16px; font-size: 28px; line-height: 36px; font-weight: 500; }
section { margin-top: 64px; }
h2 { margin: 0 0 16px; font-size: 14px; line-height: 20px; font-weight: 500; }

/* ---------- project rows: logo, name, chevron; opens to a blurb and a link ---------- */
.row summary {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 0;
  font-size: 28px; line-height: 36px; font-weight: 500;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.row summary::-webkit-details-marker { display: none; }
.row summary:hover .name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.row summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
.logo { flex: none; width: 44px; height: 44px; display: block; }
.name { flex: 1; }
.chev { flex: none; width: 20px; height: 20px; transition: transform .32s cubic-bezier(.2,.7,.2,1); }
.row[open]:not(.closing) .chev { transform: rotate(180deg); }
.row-body { padding-left: 60px; overflow: hidden; }
.col .row-body p:first-child { margin-top: 0; }
.row-meta { display: flex; justify-content: space-between; gap: 16px; margin: 12px 0 16px; font-size: 14px; line-height: 20px; }
.row-meta a { text-underline-offset: 3px; }

/* ---------- footer bar ---------- */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 16px 24px;
  font: 400 12px/16px var(--mono);
  text-transform: uppercase;
  color: var(--ink);
  background: var(--bg);
  pointer-events: none;
}
.bar > * { pointer-events: auto; }
.bar nav { display: flex; gap: 24px; }
.bar nav a { text-decoration: underline dotted; text-underline-offset: 3px; }
.bar nav a:hover { text-decoration-style: solid; }
.bar .r { text-align: right; }
.bar time { font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
  .bar { grid-template-columns: 1fr; justify-items: center; padding: 12px 16px; }
  .bar .l, .bar .r { display: none; }
  .col { padding-left: 16px; padding-right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
