/* KrowForge — landing v3
 * Editorial-technical. Richer rhythm, more surfaces, still calm.
 */

/* ---- nav ---- */
.nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 18px 48px;
  font-family: var(--sans);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  backdrop-filter: saturate(120%) blur(4px);
}
html[data-theme="dark"] .nav { background: var(--paper); }

.brand {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.22em;
  color: var(--ink);
  display: inline-flex; align-items: baseline; gap: 6px;
}
.brand-ver {
  font-size: 9.5px;
  letter-spacing: 0.25em;
  color: var(--accent);
  border: 1px solid currentColor;
  padding: 1px 4px;
  transform: translateY(-2px);
}

.nav-links {
  display: flex;
  gap: 26px;
  justify-content: center;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-dim);
}
.nav-links a:hover { color: var(--accent); }

.nav-right { display: flex; align-items: center; gap: 14px; justify-self: end; }

/* ---- hero ---- */
.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 80px 48px 64px;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
  margin-bottom: 30px;
  text-transform: uppercase;
}
.hero-kicker .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.hero-kicker .sep { opacity: 0.4; }

.hero-title {
  font-family: var(--serif);
  font-size: clamp(64px, 11vw, 152px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  font-weight: 700;
  margin-bottom: 30px;
}
.hero-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.hero-dek {
  font-family: var(--serif);
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 720px;
  margin-bottom: 36px;
}
.hero-cta { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }

/* detected strip */
.detected {
  margin-top: 56px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 14px 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
}
.detected-row {
  padding: 10px 20px;
  border-right: 1px solid var(--rule);
  display: flex; align-items: center; gap: 10px;
}
.detected-row:last-child { border-right: none; }
.detected .tag {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
  padding: 2px 7px;
  border: 1px solid var(--rule);
}
.detected .tag.warn { color: var(--accent); border-color: var(--accent); }
.detected .tag.ok   { color: var(--ink); border-color: var(--ink); }

@media (max-width: 820px) {
  .detected { grid-template-columns: 1fr 1fr; }
  .detected-row:nth-child(2) { border-right: none; }
}
@media (max-width: 540px) {
  .detected { grid-template-columns: 1fr; }
  .detected-row { border-right: none; border-bottom: 1px solid var(--rule); }
  .detected-row:last-child { border-bottom: none; }
}

/* ---- section scaffolding ---- */
.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 96px 48px;
  border-top: 1px solid var(--rule);
}
.section-head {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 28px;
  margin-bottom: 48px;
  align-items: baseline;
}
.section-num {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
  text-transform: uppercase;
  padding-top: 6px;
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(34px, 4.5vw, 52px);
  letter-spacing: -0.02em;
  font-weight: 600;
  line-height: 1.08;
}
.section-title em { font-style: italic; font-weight: 400; color: var(--accent); }

@media (max-width: 720px) {
  .section-head { grid-template-columns: 1fr; gap: 8px; }
  .section { padding: 64px 22px; }
}

/* ---- capabilities grid ---- */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--rule);
  background: var(--paper-2);
}
.cap {
  padding: 32px 30px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.cap:nth-child(2n) { border-right: none; }
.cap:nth-child(n+3) { border-bottom: none; }
.cap-num {
  position: absolute;
  top: 18px; right: 22px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.15em;
}
.cap h3 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}
.cap p {
  font-family: var(--serif);
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.cap code {
  background: var(--paper);
  padding: 1px 6px;
  font-size: 0.9em;
  border: 1px solid var(--rule);
}
.cap-code {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 12px 14px;
  white-space: pre-wrap;
  max-height: 140px;
  overflow: auto;
}
@media (max-width: 820px) {
  .cap-grid { grid-template-columns: 1fr; }
  .cap { border-right: none !important; border-bottom: 1px solid var(--rule) !important; }
  .cap:last-child { border-bottom: none !important; }
}

/* ---- visual section ---- */
.visual-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: start;
}
.visual-copy .lead {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 24px;
}
.visual-copy .lead code {
  background: var(--paper-2);
  padding: 1px 6px;
  font-size: 0.85em;
  border: 1px solid var(--rule);
}
.visual-list {
  list-style: none; margin: 0; padding: 0;
  font-family: var(--serif);
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.visual-list li {
  padding: 14px 0;
  border-top: 1px solid var(--rule);
}
.visual-list li:last-child { padding-bottom: 0; }
.visual-list strong { color: var(--ink); font-weight: 600; }

@media (max-width: 900px) {
  .visual-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* preview "device" */
.preview-device {
  border: 1px solid var(--rule);
  background: var(--paper-2);
  font-family: var(--sans);
}
.pd-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule);
  font-size: 11px;
  color: var(--ink-dim);
}
.pd-bar .pd-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ink-faint);
}
.pd-url { flex: 1; padding-left: 10px; font-size: 11px; }
.pd-state { color: var(--accent); font-size: 11px; letter-spacing: 0.1em; }

.pd-body {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  min-height: 320px;
}
.pd-hero {
  position: relative;
  padding: 36px 28px;
  border-right: 1px solid var(--rule);
  background: var(--paper);
}
.pd-hero h4 {
  font-family: var(--serif);
  font-size: 28px;
  letter-spacing: -0.015em;
  font-weight: 600;
  margin-bottom: 8px;
}
.pd-hero p {
  font-family: var(--serif);
  font-size: 14.5px;
  color: var(--ink-dim);
  margin-bottom: 22px;
}
.pd-btn {
  display: inline-block;
  padding: 10px 22px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  outline: 2px dashed var(--accent);
  outline-offset: 3px;
  animation: kf-pulse 2.2s ease-in-out infinite;
}
@keyframes kf-pulse {
  0%, 100% { outline-color: var(--accent); }
  50% { outline-color: var(--accent-soft); }
}
.pd-pick {
  position: absolute;
  bottom: 16px; left: 28px;
  font-size: 10.5px;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.pd-side {
  padding: 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--paper-2);
}
.pd-field {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-dim);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}
.pd-field .mono { color: var(--ink); font-size: 11.5px; }
.pd-swatch {
  width: 22px; height: 22px;
  background: var(--ink);
  border: 1px solid var(--rule);
}
.pd-swatch-2 { background: var(--accent); }
.pd-save {
  margin-top: auto;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  text-align: center;
  font-weight: 500;
  font-family: var(--sans);
}

.pd-foot {
  padding: 10px 14px;
  border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between;
  font-size: 10.5px;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

@media (max-width: 540px) {
  .pd-body { grid-template-columns: 1fr; }
  .pd-hero { border-right: none; border-bottom: 1px solid var(--rule); }
}

/* ---- pipeline diagram ---- */
.pipeline .diagram {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper-2);
  border: 1px solid var(--rule);
  padding: 28px 24px;
  margin: 0;
  overflow-x: auto;
  white-space: pre;
}
.pipeline .caption {
  margin-top: 14px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-dim);
  text-align: center;
}

/* ---- rules table ---- */
.rules-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--serif);
  font-size: 16.5px;
}
.rules-table th, .rules-table td {
  text-align: left;
  vertical-align: top;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  font-weight: inherit;
}
.rules-table tr:last-child th, .rules-table tr:last-child td { border-bottom: none; }
.rules-table th {
  width: 38%;
  color: var(--ink);
  font-weight: 600;
  padding-right: 28px;
}
.rules-table td { color: var(--ink-soft); }
.rules-table code {
  font-size: 0.9em;
  background: var(--paper-2);
  padding: 1px 6px;
  border: 1px solid var(--rule);
}

/* ---- end cta ---- */
.end-cta {
  text-align: center;
  padding: 100px 48px 80px;
  border-top: 1px solid var(--rule);
  background: var(--paper-2);
}
.end-cta h2 {
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 36px;
  max-width: 860px;
  margin-left: auto; margin-right: auto;
}

/* ---- colophon ---- */
.colophon {
  padding: 24px 48px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-dim);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--rule);
}
.colophon strong { color: var(--ink); font-weight: 600; }
.colophon a { color: var(--accent); }

/* ---- responsive ---- */
@media (max-width: 720px) {
  .nav { grid-template-columns: auto auto; padding: 14px 20px; gap: 14px; }
  .nav-links { display: none; }
  .hero { padding: 48px 22px 48px; }
  .hero-cta { gap: 16px; }
  .end-cta { padding: 64px 22px; }
  .colophon { padding: 18px 22px; flex-direction: column; gap: 6px; }
}
/* KrowForge — landing
 * Clean editorial. Minimal nav. No masthead/Vol-0 theatrics.
 */

/* ---- nav ---- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 48px;
  font-family: var(--sans);
  border-bottom: 1px solid transparent;
}
.brand {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.22em;
  color: var(--ink);
}
.brand:hover { color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 14px; }

/* ---- doc ---- */
.doc {
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 48px 120px;
}

/* ---- lede ---- */
.lede { margin-bottom: 100px; }
.display {
  font-family: var(--serif);
  font-size: clamp(56px, 9vw, 108px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin-bottom: 32px;
}
.display em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.dek {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 620px;
  margin-bottom: 36px;
}
.lede-cta { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }

/* ---- section heading ---- */
.section-h {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 36px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}

/* ---- movements ---- */
.protocol { margin-bottom: 96px; }
.movements { list-style: none; margin: 0; padding: 0; }
.movements li {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 28px;
  padding: 26px 0;
  border-top: 1px solid rgba(128,128,128,0.18);
}
.movements li:first-child { border-top: none; padding-top: 6px; }
.mv-num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-faint);
  padding-top: 6px;
}
.mv-body h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 6px;
}
.mv-body p {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 620px;
}
.mv-body code {
  background: var(--paper-2);
  padding: 1px 6px;
  font-size: 0.88em;
  border: 1px solid rgba(128,128,128,0.18);
}

/* ---- diagram ---- */
.diagram-wrap { margin-bottom: 96px; }
.diagram {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper-2);
  border: 1px solid var(--rule);
  padding: 28px 24px;
  margin: 0;
  overflow-x: auto;
  white-space: pre;
  tab-size: 2;
}
.caption {
  margin-top: 12px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-dim);
  text-align: center;
}

/* ---- rules table ---- */
.rules { margin-bottom: 96px; }
.rules-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--serif);
  font-size: 16.5px;
}
.rules-table th, .rules-table td {
  text-align: left;
  vertical-align: top;
  padding: 16px 0;
  border-bottom: 1px solid rgba(128,128,128,0.18);
  font-weight: inherit;
}
.rules-table th {
  width: 38%;
  color: var(--ink);
  font-weight: 600;
  padding-right: 28px;
}
.rules-table td { color: var(--ink-soft); }
.rules-table code {
  font-size: 0.9em;
  background: var(--paper-2);
  padding: 1px 6px;
  border: 1px solid rgba(128,128,128,0.18);
}

/* ---- end cta ---- */
.end-cta {
  text-align: center;
  padding: 56px 24px 24px;
  border-top: 1px solid var(--rule);
}
.end-cta h2 {
  font-family: var(--serif);
  font-size: clamp(30px, 4.4vw, 42px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}

/* ---- colophon ---- */
.colophon {
  padding: 18px 48px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-dim);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--rule);
}
.colophon a { color: var(--accent); }

@media (max-width: 720px) {
  .nav, .colophon { padding-left: 22px; padding-right: 22px; }
  .doc { padding: 32px 22px 80px; }
  .movements li { grid-template-columns: 1fr; gap: 4px; }
  .rules-table th, .rules-table td { display: block; width: auto; padding: 6px 0; }
  .rules-table tr { padding: 10px 0; display: block; border-bottom: 1px solid rgba(128,128,128,0.18); }
}
