/* ============================================================
   Build Lab — design system  (Direction B · Lab Notebook)
   An editorial layer over the Y Build brand DNA.
   ============================================================ */

:root {
  /* surfaces */
  --base:        oklch(0.965 0.008 120);  /* warm off-white page */
  --base-2:      oklch(0.980 0.006 120);  /* lighter row tint */
  --paper:       oklch(0.945 0.010 130);  /* hatch tone */
  --white:       #ffffff;

  /* ink / text */
  --ink:         oklch(0.20 0.010 220);   /* near-black headlines */
  --ink-body:    oklch(0.30 0.010 220);   /* prose */
  --muted:       oklch(0.42 0.010 220);   /* secondary text */
  --muted-2:     oklch(0.62 0.008 220);   /* meta / labels */
  --faint:       oklch(0.78 0.006 220);   /* faintest numerals */

  /* brand */
  --forest:      oklch(0.45 0.085 175);   /* accent */
  --forest-deep: oklch(0.35 0.075 175);
  --forest-ink:  #0b3d3a;
  --forest-soft: oklch(0.92 0.025 175);   /* soft chip bg */
  --forest-tint: oklch(0.97 0.012 175);   /* table win column */
  --gold:        oklch(0.82 0.11 85);     /* data accent */
  --gold-deep:   oklch(0.55 0.10 70);

  /* lines */
  --line:        rgba(20,25,30,0.10);
  --line-soft:   rgba(20,25,30,0.07);
  --line-strong: rgba(20,25,30,0.14);
  --rule:        rgba(20,25,30,0.045);    /* ruled-paper line */

  /* shadows */
  --sh-1: 0 1px 2px rgba(16,24,40,0.04);
  --sh-2: 0 1px 3px rgba(16,24,40,0.06), 0 8px 20px -10px rgba(16,24,40,0.12);
  --sh-3: 0 4px 12px -4px rgba(16,24,40,0.10), 0 30px 60px -30px rgba(16,24,40,0.35);

  --maxw: 1180px;
}

/* ---- reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--base);
  color: var(--ink-body);
  font-family: -apple-system, 'SF Pro Text', 'PingFang SC', system-ui, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; border-radius: 4px; }

/* ---- font helpers ---- */
.nr { font-family: 'Newsreader', Georgia, 'Songti SC', serif; font-optical-sizing: auto; }
.mn { font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace; }
.ss { font-family: -apple-system, 'SF Pro Text', 'PingFang SC', system-ui, 'Helvetica Neue', Arial, sans-serif; }

/* ---- layout ---- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 40px; }
.section { padding: 40px 0; }

/* ruled-paper background (horizontal lines) */
.ruled { background-image: linear-gradient(var(--rule) 1px, transparent 1px); background-size: 100% 32px; }
/* dotted grid (dark blocks) */
.gridlines {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 30px 30px;
}
.gridlines--h { background-image: linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px); background-size: 100% 26px; }
/* diagonal hatch placeholder */
.hatch {
  background: repeating-linear-gradient(135deg,
    var(--paper), var(--paper) 12px,
    var(--base) 12px, var(--base) 24px);
}

/* ============================================================
   Kickers, badges, pills
   ============================================================ */
.kicker {
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--forest); font-weight: 600;
}
.kicker--muted { color: var(--muted-2); font-weight: 500; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  font-size: 10.5px; letter-spacing: 0.9px; text-transform: uppercase; font-weight: 600;
  padding: 4px 10px; border-radius: 5px;
}
.badge--gold { background: var(--gold); color: var(--forest-ink); }
.badge--soft { background: var(--forest-soft); color: var(--forest); }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 500; padding: 6px 13px; border-radius: 999px;
}
.pill--soft { background: var(--forest-soft); color: var(--forest-ink); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; padding: 9px 16px; border-radius: 999px;
  border: 0; white-space: nowrap; transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--forest { background: var(--forest); color: #fff; box-shadow: 0 1px 2px rgba(11,61,58,0.3), 0 8px 18px -8px rgba(11,61,58,0.4); }
.btn--forest:hover { box-shadow: 0 2px 4px rgba(11,61,58,0.35), 0 12px 24px -8px rgba(11,61,58,0.5); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--white { background: #fff; color: var(--ink); box-shadow: 0 8px 24px -10px rgba(0,0,0,0.4); }
.btn--ghost { background: #fff; color: var(--ink); border: 0.5px solid var(--line-strong); }
.btn--lg { font-size: 14px; padding: 13px 24px; }

.arrow { transition: transform .15s ease; }
.btn:hover .arrow, a:hover > .arrow { transform: translateX(2px); }

/* ============================================================
   Logo lockup
   ============================================================ */
.logo { display: inline-flex; align-items: center; gap: 11px; }
.logo__mark {
  width: 30px; height: 30px; border-radius: 8px; background: var(--ink);
  display: flex; align-items: center; justify-content: center; position: relative; flex: none;
}
.logo__mark .nr { color: #fff; font-size: 18px; font-weight: 600; line-height: 1; }
.logo__mark::after {
  content: ""; position: absolute; top: 5px; right: 5px;
  width: 5px; height: 5px; border-radius: 999px; background: var(--gold);
}
.logo__word { display: flex; align-items: baseline; gap: 5px; }
.logo__word .b { font-family: 'Newsreader', Georgia, serif; font-size: 19px; font-weight: 600; letter-spacing: -0.3px; color: var(--ink); }
.logo__word .l { font-family: 'IBM Plex Mono', monospace; font-size: 15px; font-weight: 600; letter-spacing: -0.5px; color: var(--forest); }
.logo--lg .logo__mark { width: 34px; height: 34px; border-radius: 9px; }
.logo--lg .logo__word .b { font-size: 22px; }
.logo--lg .logo__word .l { font-size: 18px; }

/* ============================================================
   Announcement / conversion bar
   ============================================================ */
.announce {
  background: var(--ink); color: #fff;
  padding: 10px 40px; display: flex; align-items: center; justify-content: center;
  gap: 12px; flex-wrap: wrap; text-align: center;
}
.announce__tag {
  font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--gold); font-weight: 600;
}
.announce__txt { font-size: 13px; color: rgba(255,255,255,0.82); }
.announce__cta { font-size: 13px; font-weight: 600; color: #fff; display: inline-flex; align-items: center; gap: 6px; }
.announce__cta .arrow { color: var(--gold); }

/* ============================================================
   Site header / nav
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 40px; border-bottom: 0.5px solid var(--line);
  background: rgba(255,255,255,0.72); backdrop-filter: blur(10px);
}
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__link { font-size: 13.5px; font-weight: 500; color: var(--muted); transition: color .15s ease; }
.nav__link:hover { color: var(--ink); }
.nav__link.is-active { color: var(--ink); font-weight: 600; border-bottom: 2px solid var(--gold); padding-bottom: 2px; }
.nav__toggle { display: none; }

/* mobile nav drawer */
.drawer { display: none; position: fixed; inset: 0; z-index: 70; background: rgba(20,25,30,0.4); backdrop-filter: blur(2px); }
.drawer.is-open { display: block; }
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(82vw, 320px);
  background: var(--base); padding: 70px 26px 26px; display: flex; flex-direction: column; gap: 4px;
  box-shadow: -20px 0 50px -20px rgba(16,24,40,0.4);
  animation: slidein .2s ease;
}
@keyframes slidein { from { transform: translateX(20px); opacity: .6; } to { transform: translateX(0); opacity: 1; } }
.drawer__panel a:not(.btn) { font-size: 18px; font-weight: 500; color: var(--ink); padding: 13px 0; border-bottom: 0.5px solid var(--line); font-family: 'Newsreader', Georgia, serif; }
.drawer__panel .btn { margin-top: 18px; justify-content: center; padding: 13px; font-size: 14px; }
.drawer__close { position: absolute; top: 22px; right: 22px; width: 38px; height: 38px; border-radius: 11px; background: #fff; border: 0.5px solid var(--line-strong); color: var(--ink); font-size: 15px; display: flex; align-items: center; justify-content: center; }

/* ============================================================
   Cards — note cards
   ============================================================ */
.card { background: #fff; border: 0.5px solid var(--line); border-radius: 8px; }
.surface { background: var(--base); }

.note {
  background: #fff; border: 0.5px solid var(--line); border-radius: 8px; overflow: hidden;
  display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.note:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--line-strong); }
.note__cover { height: 118px; border-bottom: 0.5px solid var(--line-soft); display: flex; align-items: center; justify-content: center; position: relative; }
.note__cover .mn { font-size: 10px; color: var(--muted-2); }
.note__cover--dark { background: var(--ink); }
.note__body { padding: 16px 18px 18px; }
.note__cat { font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--forest); font-weight: 600; }
.note__title { font-family: 'Newsreader', Georgia, serif; font-size: 18px; font-weight: 600; letter-spacing: -0.3px; line-height: 1.22; color: var(--ink); margin-top: 9px; }
.note__dek { font-size: 12.5px; color: var(--muted); margin-top: 8px; line-height: 1.45; }
.note__meta { font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; color: var(--muted-2); margin-top: 14px; }

/* avatar (hatch placeholder) */
.avatar {
  border-radius: 999px; flex: none;
  background: repeating-linear-gradient(135deg,
    var(--forest-soft), var(--forest-soft) 6px, var(--base) 6px, var(--base) 12px);
  box-shadow: inset 0 0 0 1px var(--line);
}

/* ============================================================
   CTA bands
   ============================================================ */
.band { border-radius: 10px; position: relative; overflow: hidden; }
.band--forest { background: var(--forest); color: #fff; }
.band--ink { background: var(--ink); color: #fff; }
.band__bg { position: absolute; inset: 0; pointer-events: none; }
.band__bg--rule { background-image: linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px); background-size: 100% 28px; }
.band__bg--grid { background-image: linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px); background-size: 30px 30px; }
.band > * { position: relative; }

/* subscribe input */
.subscribe { display: inline-flex; align-items: center; background: #fff; border: 0.5px solid var(--line-strong); border-radius: 999px; padding: 5px 5px 5px 18px; box-shadow: var(--sh-1); max-width: 100%; }
.subscribe input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 14px; color: var(--ink); min-width: 0; padding: 8px 0; }
.subscribe input::placeholder { color: var(--muted-2); }
.subscribe--block { display: flex; width: 100%; }
.subscribe--sq { border-radius: 10px; padding: 6px 6px 6px 18px; }
.subscribe--sq .btn { border-radius: 7px; }

/* ============================================================
   Footer
   ============================================================ */
.footer { background: var(--ink); color: #fff; margin-top: 56px; position: relative; overflow: hidden; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding: 56px 40px 40px; }
.footer h4 { font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase; color: rgba(255,255,255,0.45); margin-bottom: 16px; font-weight: 500; }
.footer a.flink { display: block; font-size: 13.5px; color: rgba(255,255,255,0.78); padding: 5px 0; transition: color .15s ease; }
.footer a.flink:hover { color: #fff; }
.footer__brandtxt { font-size: 13.5px; color: rgba(255,255,255,0.55); margin-top: 12px; line-height: 1.55; max-width: 280px; }
.footer__logo { display: flex; align-items: baseline; gap: 5px; }
.footer__logo .b { font-family: 'Newsreader', Georgia, serif; font-size: 20px; font-weight: 600; color: #fff; }
.footer__logo .l { font-family: 'IBM Plex Mono', monospace; font-size: 15px; font-weight: 600; color: var(--gold); }
.footer__bottom { border-top: 0.5px solid rgba(255,255,255,0.10); padding: 18px 40px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer__copy { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: rgba(255,255,255,0.4); }

/* ============================================================
   Mobile sticky CTA bar (hidden on desktop)
   ============================================================ */
.mcta {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: #fff; border-top: 0.5px solid var(--line);
  box-shadow: 0 -10px 26px -14px rgba(16,24,40,0.3);
  padding: 10px 18px; align-items: center; gap: 12px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
}
.mcta__txt .t { font-size: 13px; font-weight: 600; color: var(--ink); }
.mcta__txt .s { font-family: 'IBM Plex Mono', monospace; font-size: 9px; color: var(--muted-2); margin-top: 1px; }

/* ============================================================
   Prose (article body)
   ============================================================ */
.prose { font-size: 16.5px; line-height: 1.7; color: var(--ink-body); }
.prose > p { margin: 0 0 20px; }
.prose h2 {
  font-family: 'Newsreader', Georgia, serif; font-size: 28px; font-weight: 600; letter-spacing: -0.4px;
  color: var(--ink); margin: 34px 0 14px; padding-bottom: 10px; border-bottom: 0.5px solid var(--line);
  scroll-margin-top: 90px;
}
.prose h2:first-child { margin-top: 0; }
.prose b { font-weight: 600; }
.prose ul { margin: 0 0 30px; padding-left: 0; list-style: none; }
.prose li { display: flex; gap: 10px; margin-bottom: 10px; }
.prose li .lead { color: var(--forest); font-weight: 700; }
.prose a.link { color: var(--forest); text-decoration: underline; text-underline-offset: 2px; }

/* code block */
.code { border-radius: 10px; overflow: hidden; margin: 0 0 28px; border: 0.5px solid var(--line-strong); }
.code__bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: oklch(0.24 0.012 175); border-bottom: 0.5px solid rgba(255,255,255,0.08); }
.code__name { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: rgba(255,255,255,0.55); }
.code__copy { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: rgba(255,255,255,0.4); letter-spacing: 0.5px; background: transparent; border: 0; }
.code pre { margin: 0; background: oklch(0.20 0.012 175); padding: 18px; overflow-x: auto; font-family: 'IBM Plex Mono', monospace; font-size: 13px; line-height: 1.65; color: oklch(0.90 0.02 160); white-space: pre-wrap; }

/* callout */
.callout { display: flex; gap: 12px; background: var(--forest-soft); border-radius: 8px; padding: 16px 18px; margin-bottom: 26px; }
.callout .ic { font-size: 16px; line-height: 1.4; }
.callout p { font-size: 13px; color: var(--forest-ink); line-height: 1.5; margin: 0; }
.callout u { text-decoration: underline; }

/* pull quote */
.pullquote { border-left: 3px solid var(--forest); padding: 6px 0 6px 22px; margin: 0 0 30px; }
.pullquote p { font-family: 'Newsreader', Georgia, serif; font-size: 23px; font-weight: 500; font-style: italic; line-height: 1.4; color: var(--ink); margin: 0; }
.pullquote mark { font-style: normal; background: var(--forest-soft); padding: 0 6px; border-radius: 4px; color: var(--ink); }

/* figure caption */
.figcap { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--muted-2); margin: 0 0 30px; }

/* comparison table */
.tbl-wrap { border: 0.5px solid var(--line-strong); border-radius: 10px; overflow: hidden; margin: 0 0 14px; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl thead tr { background: var(--ink); }
.tbl th { padding: 13px 12px; }
.tbl th.metric { text-align: left; font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 0.5px; text-transform: uppercase; color: rgba(255,255,255,0.6); font-weight: 500; padding-left: 16px; }
.tbl th.col { text-align: center; font-size: 13px; color: rgba(255,255,255,0.92); font-weight: 600; }
.tbl th.win { background: var(--forest-deep); color: #fff; font-weight: 700; }
.tbl td { padding: 13px 12px; border-bottom: 0.5px solid var(--line-soft); font-size: 14px; text-align: center; color: var(--muted); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.metric { text-align: left; padding-left: 16px; color: var(--ink-body); font-weight: 500; }
.tbl td.win { background: var(--forest-tint); color: var(--ink); font-weight: 600; }

/* ============================================================
   Utilities
   ============================================================ */
.divider { flex: 1; height: 1px; background: var(--line); }
.vrule { width: 1px; align-self: stretch; background: var(--line); }
.hide { display: none !important; }
.spin { display: inline-block; }
