/* Clink Forge — clinkforge.com
   Implemented from design_handoff_clink_forge/README.md (high fidelity).
   Committed dark. One steel accent. Square corners everywhere. */

/* ---------- fonts (self-hosted, latin) ---------- */
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/barlow-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/barlow-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/barlow-condensed-600.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-500.woff2') format('woff2');
}

/* ---------- tokens ---------- */
:root {
  --ground: #16181b;
  --panel: #1c1f23;
  --well: #111316;
  --ink-high: #e6e9ec;
  --ink-body: #b4bbc4;
  --ink-muted: #8b939d;
  --steel: #7ea8cf;
  --steel-hover: #a3c6e4;
  --hairline: rgba(230, 233, 236, 0.11);
  --green: #4fb87f;
  --amber: #d9a03f;
  --red: #e0736b;

  --font-display: "Barlow Condensed", system-ui, sans-serif;
  --font-body: "Barlow", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

/* ---------- base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; border-radius: 0; }

html { background: var(--ground); }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  background: var(--ground);
  color: var(--ink-body);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a, button {
  transition: color 120ms ease-out, background-color 120ms ease-out,
              border-color 120ms ease-out;
}
:focus-visible { outline: 2px solid var(--steel); outline-offset: 2px; }
::selection { background: rgba(126, 168, 207, 0.30); }

main { max-width: 1440px; margin: 0 auto; }
section { scroll-margin-top: 24px; padding: 0 80px 72px; }

/* ---------- blueprint corner marks ---------- */
.blueprint { position: relative; border: 1px solid var(--hairline); }
.blueprint > .corner {
  position: absolute; width: 11px; height: 11px;
  color: rgba(230, 233, 236, 0.55);
  pointer-events: none;
}
.blueprint > .corner::before,
.blueprint > .corner::after { content: ""; position: absolute; background: currentColor; }
.blueprint > .corner::before { left: 5px; top: 0; width: 1px; height: 100%; }
.blueprint > .corner::after  { top: 5px; left: 0; width: 100%; height: 1px; }
.blueprint > .corner.tl { top: -6px; left: -6px; }
.blueprint > .corner.tr { top: -6px; right: -6px; }
.blueprint > .corner.bl { bottom: -6px; left: -6px; }
.blueprint > .corner.br { bottom: -6px; right: -6px; }

/* ---------- shared bits ---------- */
.wordmark { display: flex; flex-direction: column; }
.wordmark span {
  font-family: var(--font-display); font-weight: 600;
  letter-spacing: 0.26em; line-height: 0.92; font-size: 15px;
  color: var(--ink-high); text-transform: uppercase;
}
.wordmark span + span { color: var(--steel); }

.dot { display: inline-block; width: 6px; height: 6px; flex: none; }
.dot.green { background: var(--green); }
.dot.amber { background: var(--amber); }
.dot.lg { width: 7px; height: 7px; }

.section-head {
  display: flex; align-items: baseline; gap: 16px;
  border-top: 1px solid var(--hairline);
  padding-top: 20px; margin-bottom: 44px;
}
.section-head .num { font-family: var(--font-mono); font-weight: 500; font-size: 12px; color: var(--steel); }
.section-head h2 {
  font-family: var(--font-display); font-weight: 600; font-size: 34px;
  line-height: 1; letter-spacing: 0.03em; text-transform: uppercase;
  color: var(--ink-high);
}
.section-head .meta {
  margin-left: auto; font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.08em; color: var(--ink-muted);
}

/* ---------- header ---------- */
.site-header {
  height: 64px; padding: 0 80px;
  border-bottom: 1px solid var(--hairline);
  display: flex; align-items: center; gap: 32px;
  max-width: 1440px; margin: 0 auto;
}
.site-header .brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.site-header .brand img { width: 26px; height: 26px; object-fit: contain; display: block; }
.site-header nav { display: flex; gap: 28px; }
.site-header nav a {
  font-family: var(--font-mono); font-weight: 500; font-size: 12px;
  letter-spacing: 0.10em; text-transform: uppercase; color: var(--ink-body);
}
.site-header nav a:hover { color: var(--steel); }
.site-header .host {
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.06em; color: var(--ink-muted);
}
.site-header .live-mini { display: none; }
.mobile-nav { display: none; }

/* ---------- hero ---------- */
.hero {
  padding: 96px 80px 72px;
  display: grid; grid-template-columns: 1fr 400px; gap: 80px;
  align-items: start;
}
.eyebrow { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.eyebrow::before { content: ""; width: 34px; height: 1px; background: var(--steel); }
.eyebrow span {
  font-family: var(--font-mono); font-weight: 500; font-size: 12px;
  letter-spacing: 0.20em; text-transform: uppercase; color: var(--steel);
}
.hero h1 {
  font-family: var(--font-display); font-weight: 600; font-size: 78px;
  line-height: 0.94; letter-spacing: 0.005em; text-transform: uppercase;
  color: var(--ink-high); text-wrap: balance;
}
.hero .sub { margin-top: 28px; max-width: 640px; font-size: 19px; line-height: 1.55; }
.cta-row { margin-top: 40px; display: flex; gap: 16px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 15px 30px;
  font-family: var(--font-display); font-weight: 600; font-size: 14px;
  letter-spacing: 0.14em; text-transform: uppercase; text-align: center;
}
.btn-primary { background: var(--steel); color: #16181b; }
.btn-primary:hover { background: var(--steel-hover); }
.btn-secondary { border: 1px solid var(--hairline); color: var(--ink-high); }
.btn-secondary:hover { background: rgba(230, 233, 236, 0.07); }

.brand-plate {
  background: var(--panel); padding: 34px 30px;
  display: flex; flex-direction: column; align-items: center; gap: 22px;
}
.brand-plate img { width: 200px; height: auto; display: block; }
.brand-plate hr { width: 100%; border: 0; border-top: 1px solid var(--hairline); }
.plate-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px;
  width: 100%; font-family: var(--font-mono);
}
.plate-stats .label {
  display: block; font-size: 10px; letter-spacing: 0.10em;
  text-transform: uppercase; color: var(--ink-muted); margin-bottom: 5px;
}
.plate-stats .value { font-size: 15px; color: var(--ink-high); display: flex; align-items: center; gap: 8px; }
.plate-stats .value.steel { color: var(--steel); }

/* ---------- how it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-bottom: 44px; }
.step { background: var(--panel); padding: 26px 24px 28px; }
.step .step-no {
  font-family: var(--font-mono); font-weight: 500; font-size: 11px;
  letter-spacing: 0.16em; color: var(--steel); display: block; margin-bottom: 18px;
}
.step h3 {
  font-family: var(--font-display); font-weight: 600; font-size: 24px;
  line-height: 1.1; letter-spacing: 0.02em; text-transform: uppercase;
  color: var(--ink-high); margin-bottom: 12px;
}
.step p { font-size: 15px; line-height: 1.5; }
.step p code { font-family: var(--font-mono); font-size: 13px; color: var(--amber); }

.transcript { background: var(--well); border: 1px solid var(--hairline); }
.transcript figcaption {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 18px; border-bottom: 1px solid var(--hairline);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-muted);
}
.transcript pre {
  padding: 26px 28px; overflow-x: auto;
  font-family: var(--font-mono); font-size: 13.5px; line-height: 1.75;
  color: var(--ink-body);
}
.transcript .p  { color: var(--ink-muted); }   /* $ prompts */
.transcript .u  { color: var(--ink-high); }    /* URLs, X-PAYMENT literal */
.transcript .a  { color: var(--amber); }       /* 402 */
.transcript .g  { color: var(--green); }       /* 200 */
.transcript .s  { color: var(--steel); }       /* money, cryptographic values */

/* ---------- catalog ---------- */
.catalog-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.sku {
  background: var(--panel); padding: 22px 20px;
  display: flex; flex-direction: column; gap: 12px;
}
.sku .slug {
  font-family: var(--font-mono); font-weight: 500; font-size: 13px;
  line-height: 1.3; color: var(--ink-high); word-break: break-all;
}
.sku .desc { font-size: 14px; line-height: 1.5; flex: 1; }
.sku .foot {
  border-top: 1px solid var(--hairline); padding-top: 11px;
  display: flex; justify-content: space-between; align-items: baseline;
}
.sku .src {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.10em;
  text-transform: uppercase; color: var(--ink-muted);
}
.sku .price { font-family: var(--font-mono); font-weight: 500; font-size: 14px; color: var(--steel); }

.catalog-foot {
  margin-top: 32px; border-top: 1px solid var(--hairline); padding-top: 20px;
  display: flex; align-items: center; gap: 12px;
}
.catalog-foot p { font-size: 15px; }
.catalog-foot p strong { color: var(--ink-high); font-weight: 500; }
.catalog-foot .all {
  margin-left: auto; font-family: var(--font-mono); font-weight: 500;
  font-size: 12px; letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--steel); border-bottom: 1px solid var(--steel); padding-bottom: 2px;
  white-space: nowrap;
}
.catalog-foot .all:hover { color: var(--steel-hover); border-color: var(--steel-hover); }

/* ---------- trust mesh ---------- */
.trust-mesh {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--hairline); border: 1px solid var(--hairline);
}
.trust-cell { background: var(--panel); padding: 30px 28px 32px; }
.trust-cell .idx {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-weight: 500; font-size: 11px;
  letter-spacing: 0.16em; color: var(--ink-muted); margin-bottom: 16px;
}
.trust-cell .idx.amber { color: var(--amber); }
.trust-cell h4 {
  font-family: var(--font-display); font-weight: 600; font-size: 21px;
  line-height: 1.1; letter-spacing: 0.03em; text-transform: uppercase;
  color: var(--ink-high); margin-bottom: 12px;
}
.trust-cell p { font-size: 15px; line-height: 1.5; }
.trust-cell p code { font-family: var(--font-mono); font-size: 13px; color: var(--steel); }
.trust-cell.hole {
  background: var(--ground);
  display: flex; flex-direction: column; justify-content: center; gap: 14px;
}
.trust-cell.hole .label {
  font-family: var(--font-mono); font-weight: 500; font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-muted);
}
.trust-cell.hole a {
  font-family: var(--font-mono); font-size: 15px; color: var(--steel);
  align-self: flex-start;
}
.trust-cell.hole a:hover { color: var(--steel-hover); }

/* ---------- for agents ---------- */
#agents { padding-bottom: 76px; }
.agents-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.agent-cell {
  display: block; background: var(--well); padding: 22px 20px 24px;
}
.agent-cell .path {
  font-family: var(--font-mono); font-weight: 500; font-size: 14px;
  color: var(--steel); margin-bottom: 10px;
}
.agent-cell p { font-size: 14px; line-height: 1.5; }
.agent-cell:hover { border-color: var(--steel); }
.agent-cell:hover .path { color: var(--steel-hover); }

/* ---------- footer ---------- */
.site-footer {
  max-width: 1440px; margin: 0 auto;
  padding: 34px 80px 44px; border-top: 1px solid var(--hairline);
  display: flex; align-items: flex-end; gap: 40px;
}
.site-footer .brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.site-footer .brand img { width: 22px; height: 22px; opacity: 0.75; display: block; }
.site-footer .brand .wordmark span { font-size: 13px; }
.site-footer .mail { font-family: var(--font-mono); font-size: 13px; color: var(--ink-body); }
.site-footer .mail:hover { color: var(--steel); }
.site-footer .legal { font-family: var(--font-mono); font-size: 13px; color: var(--ink-muted); }

/* ---------- tablet (760–1099) ---------- */
@media (max-width: 1099px) {
  section { padding-left: 40px; padding-right: 40px; }
  .site-header { padding: 0 40px; }
  .site-footer { padding-left: 40px; padding-right: 40px; }
  .hero { padding: 64px 40px 56px; grid-template-columns: 1fr; gap: 44px; }
  .hero h1 { font-size: 56px; }
  .brand-plate { width: 100%; }
  .plate-stats { grid-template-columns: repeat(4, 1fr); }
  .catalog-grid, .agents-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-mesh { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- mobile (<760) ---------- */
@media (max-width: 759px) {
  body { font-size: 14px; }
  section { padding: 0 20px 44px; }
  .section-head { margin-bottom: 26px; }
  .section-head h2 { font-size: 26px; }

  .site-header { height: 56px; padding: 0 20px; gap: 16px; }
  .site-header nav { display: none; }
  .site-header .host { display: none; }
  .site-header .brand .wordmark span { font-size: 13px; }
  .site-header .live-mini {
    display: flex; align-items: center; gap: 8px;
    font-family: var(--font-mono); font-size: 11px; color: var(--ink-muted);
  }
  .mobile-nav {
    display: flex; gap: 20px; overflow-x: auto; white-space: nowrap;
    padding: 12px 20px; border-bottom: 1px solid var(--hairline);
  }
  .mobile-nav a {
    font-family: var(--font-mono); font-weight: 500; font-size: 12px;
    letter-spacing: 0.10em; text-transform: uppercase; color: var(--ink-body);
  }
  .mobile-nav a:hover { color: var(--steel); }

  .hero { padding: 44px 20px 44px; gap: 36px; }
  .hero h1 { font-size: 44px; line-height: 0.96; }
  .hero .sub { font-size: 16px; }
  .cta-row { flex-direction: column; }
  .btn { width: 100%; padding: 16px 20px; }

  .steps { grid-template-columns: 1fr; gap: 16px; margin-bottom: 26px; }
  .step h3 { font-size: 20px; }
  .step p, .trust-cell p, .agent-cell p { font-size: 14px; }
  .trust-cell h4 { font-size: 19px; }

  .transcript pre { padding: 18px 16px; font-size: 10.5px; line-height: 1.7; }

  .catalog-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .sku { padding: 16px 14px; }
  .sku .slug { font-size: 11.5px; }
  .sku .desc { font-size: 12.5px; }
  .sku .foot { flex-direction: column; align-items: flex-start; gap: 4px; }
  .catalog-foot { flex-wrap: wrap; }
  .catalog-foot .all { margin-left: 0; }

  .trust-mesh, .agents-grid { grid-template-columns: 1fr; }
  .agents-grid { gap: 14px; }

  .site-footer { padding: 26px 20px 34px; flex-wrap: wrap; gap: 16px 24px; }
}
