/* NERD LAB — ink, off-white, one accent. Nothing else. */

:root {
  --ink:      #141419;
  --ink-2:    #1c1c23;   /* one step up, for card fills */
  --offwhite: #F4F1EA;
  --volt:     #C8F531;
  --muted:    #9A9996;   /* off-white at 60% over ink — 6.4:1, passes AA */
  --line:     #2b2b34;

  --display: Futura, "Avenir Next", "Century Gothic", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --wrap: 60rem;
  --pad: clamp(1.25rem, 5vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--offwhite);
  font-family: var(--display);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; display: block; }

a { color: var(--volt); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--volt);
  outline-offset: 3px;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }

.skip {
  position: absolute; left: -9999px;
  background: var(--volt); color: var(--ink);
  padding: 0.75rem 1rem; font-family: var(--mono); font-size: 0.85rem;
  text-decoration: none; z-index: 10;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* ---------- debug annotations ---------- */

.anno {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

/* ---------- hero ---------- */

.hero {
  padding-block: clamp(3rem, 10vh, 6rem) clamp(2.5rem, 8vh, 4.5rem);
  border-bottom: 1px solid var(--line);
}

.wordmark { margin: 0 0 1.75rem; }

.wm-stack {
  position: relative;
  display: block;
  width: min(100%, 34rem);
}
.wm-stack img { width: 100%; height: auto; }

.wm-ghost {
  position: absolute; inset: 0;
  opacity: 0;
  pointer-events: none;
}

/* one 140 ms channel split, then it settles */
.wm-stack:hover .wm-a { animation: split-a 140ms steps(2, end) 1; }
.wm-stack:hover .wm-b { animation: split-b 140ms steps(2, end) 1; }

@keyframes split-a {
  0%   { opacity: 0; transform: translate(0, 0); }
  40%  { opacity: 0.75; transform: translate(-3px, 1px); }
  100% { opacity: 0; transform: translate(0, 0); }
}
@keyframes split-b {
  0%   { opacity: 0; transform: translate(0, 0); }
  60%  { opacity: 0.45; transform: translate(3px, -1px); }
  100% { opacity: 0; transform: translate(0, 0); }
}

.tagline {
  font-size: clamp(1.5rem, 1rem + 2.4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 1.5rem;
  text-transform: uppercase;
}
.tag-2 { color: var(--volt); }

.cue {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 2.5rem;
  letter-spacing: 0.04em;
}
.chev { color: var(--volt); }
.caret {
  display: inline-block;
  width: 0.55em; height: 1.05em;
  background: var(--volt);
  margin-left: 0.15em;
  vertical-align: -0.18em;
  animation: blink 1.1s steps(1, end) infinite;
}
@keyframes blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

.video-frame { border: 1px solid var(--line); background: #000; }
.video-frame video { width: 100%; }
.video-note {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
  padding: 0.7rem 0.9rem;
  border-top: 1px solid var(--line);
  background: var(--ink);
}

/* ---------- sections ---------- */

.sec { padding-block: clamp(3rem, 9vh, 5.5rem); border-bottom: 1px solid var(--line); }

.sec h2 {
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.1;
  text-transform: uppercase;
  margin: 0 0 1.75rem;
}

.prose { max-width: 44rem; }
.prose p { margin: 0 0 1.1rem; }
.prose p:last-child { margin-bottom: 0; }
.lead { font-size: 1.15em; }
.prose p:not(.lead) { color: var(--muted); }

/* ---------- why ---------- */

.why { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.25rem; max-width: 44rem; }
.why li { position: relative; padding-left: 3.25rem; }
.why .idx {
  position: absolute; left: 0; top: 0.1em;
  font-family: var(--mono); font-size: 0.8rem;
  color: var(--volt); letter-spacing: 0.05em;
}
.why h3 {
  font-size: 1.15rem; font-weight: 700; margin: 0 0 0.4rem;
  text-transform: uppercase; letter-spacing: 0.01em;
}
.why p { margin: 0; color: var(--muted); }

/* ---------- experiments ---------- */

.cards {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.card {
  border: 1px solid var(--line);
  background: var(--ink-2);
  display: flex;
  flex-direction: column;
}

.card-main {
  display: block;
  flex: 1 1 auto;
  padding: 1.5rem 1.35rem;
  color: inherit;
  text-decoration: none;
  transition: background 120ms ease;
}

/* When a source link follows, the anchor gives up its bottom padding so the two
   lines read as one block rather than two stranded rows. */
.card-main:not(:last-child) { padding-bottom: 0.55rem; }

/* The repo link sits outside the card's main anchor — a link inside a link is
   invalid, and screen readers announce the nesting as one confused target. */
.src {
  margin: 0 !important;
  padding: 0 1.35rem 1.25rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}
.src a { color: var(--muted); text-decoration-color: var(--line); }
.src a:hover { color: var(--volt); text-decoration-color: currentColor; }

.card-lab { padding: 1.5rem 1.35rem; border-style: dashed; background: transparent; }

.card h3 {
  font-family: var(--mono);
  font-size: 1.05rem; font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 0.6rem;
}
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.status {
  font-family: var(--mono); font-size: 0.72rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  margin: 0 0 0.9rem !important;
}
.card-live .status { color: var(--volt); }
.card-lab  .status { color: var(--muted); }

.dot {
  display: inline-block; width: 0.5em; height: 0.5em;
  background: var(--volt); border-radius: 50%;
  margin-right: 0.5em; vertical-align: 0.05em;
}

.go {
  font-family: var(--mono); font-size: 0.78rem;
  letter-spacing: 0.05em;
  margin-top: 1.1rem !important;
  color: var(--volt) !important;
}
.card-live:hover, .card-live:focus-within { border-color: var(--volt); }
.card-live:hover .card-main { background: #22222b; }
.card-lab h3, .card-lab p { opacity: 0.75; }

/* Clickable, but not finished: it keeps the live card's hover and drops the
   claim — muted status, hollow dot. */
.card-wip .status { color: var(--muted); }
.card-wip .dot { background: transparent; box-shadow: inset 0 0 0 1px currentColor; }

/* ---------- join ---------- */

.doors { display: grid; gap: 1rem; margin-top: 2rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }

.btn {
  display: block;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--volt);
  color: var(--offwhite);
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: background 120ms ease, color 120ms ease;
}
.btn-sub {
  display: block;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  margin-top: 0.5rem;
}
.btn-primary { background: var(--volt); color: var(--ink); }
.btn-primary .btn-sub { color: #3a4410; }
.btn:hover { background: var(--volt); color: var(--ink); }
.btn:hover .btn-sub { color: #3a4410; }

/* ---------- footer ---------- */

.foot { padding-block: clamp(2.5rem, 7vh, 4rem); }
.foot-line {
  font-weight: 700; text-transform: uppercase;
  letter-spacing: -0.005em;
  font-size: clamp(1rem, 0.9rem + 0.6vw, 1.35rem);
  margin: 0 0 0.75rem;
  max-width: 34rem;
}
.foot .anno { margin: 0; }

/* ---------- forced colours / print ---------- */

@media (forced-colors: active) {
  .card, .btn, .video-frame { border: 1px solid CanvasText; }
  .dot, .caret { forced-color-adjust: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wm-stack:hover .wm-a,
  .wm-stack:hover .wm-b { animation: none; }
  .caret { animation: none; }
  *, *::before, *::after { transition-duration: 1ms !important; }
}
