/* ============================================================
   Cogniron — Service detail page template
   Extends homepage.css + services.css (same "Steel" system).
   Reuses: .sl-cols/.sl-col, .dl-pod, .dl-chip, .finalcta, .band-dark
   Only NEW components for the detail template live here.
   ============================================================ */

/* ── Breadcrumb ──────────────────────────────────────── */
.crumb { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--text-tertiary); }
.crumb a { color: var(--text-secondary); text-decoration: none; transition: color 140ms ease; }
.crumb a:hover { color: var(--accent); }
.crumb .sep { opacity: 0.5; }
.crumb .here { color: var(--text-primary); }

/* ── Detail hero ─────────────────────────────────────── */
.sd-hero { padding: 40px 0 92px; position: relative; overflow: hidden; }
.sd-hero::after { content: ""; position: absolute; top: -28%; right: -6%; width: 640px; height: 560px; background: radial-gradient(ellipse at center, var(--accent-glow), transparent 70%); pointer-events: none; z-index: 0; }
.sd-hero-grid { position: relative; z-index: 1; margin-top: 40px; display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,0.95fr); gap: 64px; align-items: center; }
.sd-eyebrow { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); }
.sd-h1 { margin-top: 22px; font-size: clamp(32px, 3.6vw, 50px); line-height: 1.08; letter-spacing: -0.022em; font-weight: 500; color: var(--text-primary); max-width: 18ch; text-wrap: balance; }
.sd-h1 em { color: var(--accent); font-style: normal; font-weight: 600; letter-spacing: -0.01em; }
.sd-sub { margin-top: 24px; font-size: 18px; line-height: 1.58; color: var(--text-secondary); max-width: 52ch; text-wrap: pretty; }
.sd-hero .hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* Pod-activation card in hero (ties back to "Inside Every Pod") */
.sd-podcard { border: 1px solid var(--border-subtle); border-radius: 16px; background: var(--bg-elevated); overflow: hidden; box-shadow: 0 1px 0 rgba(0,0,0,0.02), 0 32px 70px -48px rgba(9,9,11,0.26); }
.sd-podcard-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 20px; border-bottom: 1px solid var(--border-subtle); background: var(--bg-subtle); }
.sd-podcard-head .ttl { font-family: var(--font-mono); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-primary); }
.sd-podcard-head .sd-platform { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 10px; border-radius: 999px; }
.sd-platform.velocity { color: var(--accent); background: var(--accent-subtle); }
.sd-platform.assure { color: var(--success); background: color-mix(in srgb, var(--success) 14%, transparent); }
.sd-platform.both { color: var(--accent); background: var(--accent-subtle); }
.sd-podcard-body { padding: 20px 22px 22px; }
.sd-podcard-body .pl { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-tertiary); margin-bottom: 16px; }
.sd-podcard-body ul { list-style: none; display: flex; flex-direction: column; gap: 13px; }
.sd-podcard-body li { display: grid; grid-template-columns: 9px 1fr; gap: 12px; align-items: center; font-size: 14px; color: var(--text-tertiary); transition: color 200ms ease; }
.sd-podcard-body li.on { color: var(--text-primary); font-weight: 500; }
.sd-podcard-body .pd { width: 8px; height: 8px; border-radius: 999px; background: var(--border-default); transition: background 200ms ease, box-shadow 200ms ease; }
.sd-podcard-body li.on .pd { background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 16%, transparent); }

/* ── The Problem (dark editorial band) ───────────────── */
.sd-problem { position: relative; overflow: hidden; }
.sd-problem::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.45;
  background-image: linear-gradient(var(--border-subtle) 1px, transparent 1px); background-size: 100% 88px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 38%, #000 62%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 38%, #000 62%, transparent); }
.sd-problem-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 60px; align-items: end; }
.sd-problem-kicker { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 26px; font-family: var(--font-mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent); }
.sd-problem-text { font-family: var(--font-sans); font-style: normal; font-weight: 500; font-size: clamp(30px, 3.8vw, 52px); line-height: 1.08; letter-spacing: -0.025em; color: var(--text-primary); text-wrap: balance; max-width: 15ch; }
.sd-problem-text strong, .sd-problem-text em { color: var(--accent); font-style: normal; font-weight: 500; }
.sd-problem-aside { padding-bottom: 8px; }
.sd-problem-body { padding-top: 22px; border-top: 1px solid var(--border-default); font-size: 17px; line-height: 1.62; color: var(--text-secondary); text-wrap: pretty; max-width: 46ch; }
.sd-problem-body strong { color: var(--text-primary); font-weight: 600; }
.sd-problem-body em { color: var(--accent); font-style: italic; }

/* ── Service Detail framework — section head spacing ─── */
.sd-framework .sl-cols { margin-top: 52px; }
.sd-framework-note { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border-default); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sd-framework-note .badge { font-family: var(--font-mono); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); }
.sd-framework-note p { font-size: 15px; color: var(--text-secondary); }

/* Outcome chips row under hero/problem framing */
.sd-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.sd-chips .dl-chip { background: var(--bg-canvas); }

/* ════════════════════════════════════════════════════════
   Skills Marketplace — navigable catalogue
   (search + agent filter tabs → agent bands → category groups → skill cards)
   ════════════════════════════════════════════════════════ */

/* ── Toolbar: search + agent filter tabs (sticky) ────── */
.mkt-toolbar {
  margin-top: 40px;
  display: flex; flex-wrap: wrap; gap: 16px 20px; align-items: center; justify-content: space-between;
  position: sticky; top: 72px; z-index: 6;
  padding: 14px 0;
  background: color-mix(in srgb, var(--bg-canvas) 88%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--border-subtle);
}
.mkt-search { position: relative; flex: 1 1 260px; max-width: 380px; display: block; }
.mkt-search svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--text-tertiary); pointer-events: none; }
.mkt-search input {
  width: 100%; box-sizing: border-box;
  padding: 12px 14px 12px 42px;
  border-radius: 11px; border: 1px solid var(--border-subtle);
  background: var(--bg-subtle); color: var(--text-primary);
  font-family: var(--font-sans); font-size: 14.5px; line-height: 1;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}
.mkt-search input::placeholder { color: var(--text-tertiary); }
.mkt-search input:focus { outline: none; border-color: var(--accent); background: var(--bg-surface); box-shadow: 0 0 0 3px var(--accent-subtle); }
.mkt-search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.mkt-tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.mkt-tab {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.02em; color: var(--text-secondary);
  background: transparent; border: 1px solid var(--border-subtle); border-radius: 999px;
  padding: 8px 15px; cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}
.mkt-tab:hover { color: var(--text-primary); border-color: var(--border-default); }
.mkt-tab .t-ct { font-size: 10.5px; color: var(--text-tertiary); font-weight: 500; }
.mkt-tab.is-active { color: var(--accent); border-color: var(--accent); background: var(--accent-subtle); }
.mkt-tab.is-active .t-ct { color: var(--accent); }

/* ── Live result count ───────────────────────────────── */
.mkt-count { margin-top: 18px; min-height: 17px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--text-tertiary); }
.mkt-count b { color: var(--accent); font-weight: 600; }

/* ── Catalogue: agent bands ──────────────────────────── */
.mkt-catalog { margin-top: 30px; display: flex; flex-direction: column; gap: 52px; }
.mkt-agent.is-hidden { display: none; }
.mkt-agent-head { display: flex; align-items: flex-start; gap: 18px; padding-bottom: 18px; margin-bottom: 30px; border-bottom: 1px solid var(--border-default); }
.mkt-agent-idx { flex: none; font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; color: var(--accent); background: var(--accent-subtle); border-radius: 9px; padding: 8px 11px; }
.mkt-agent-meta { flex: 1; min-width: 0; }
.mkt-agent-name { font-size: 22px; font-weight: 600; letter-spacing: -0.014em; color: var(--text-primary); line-height: 1.15; }
.mkt-agent-desc { margin-top: 6px; font-size: 14.5px; line-height: 1.5; color: var(--text-secondary); max-width: 62ch; text-wrap: pretty; }
.mkt-agent-ct { flex: none; margin-left: auto; padding-top: 7px; font-family: var(--font-mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-tertiary); white-space: nowrap; }

/* ── Category groups within an agent ─────────────────── */
.mkt-cats { display: flex; flex-direction: column; gap: 34px; }
.mkt-cat.is-hidden { display: none; }
.mkt-cat-head { display: flex; align-items: center; gap: 13px; margin-bottom: 15px; }
.mc-name { font-family: var(--font-mono); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-primary); white-space: nowrap; }
.mc-ct { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; color: var(--accent); background: var(--accent-subtle); padding: 3px 9px; border-radius: 999px; }
.mc-rule { flex: 1; height: 1px; background: var(--border-subtle); }

/* ── Skill cards ─────────────────────────────────────── */
.mkt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 8px; }
.sk {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 12px 13px 12px 15px;
  border: 1px solid var(--border-subtle); border-radius: 11px;
  background: var(--bg-subtle); cursor: pointer; font-family: inherit;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms cubic-bezier(0.22,1,0.36,1);
}
.sk:hover { border-color: var(--accent); background: var(--bg-surface); transform: translateY(-1px); }
.sk:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-subtle); }
.sk.is-hidden { display: none; }
.sk-mark { flex: none; display: flex; align-items: center; width: 16px; height: 10px; }
.sk-mark i { display: block; width: 15px; height: 6px; background: var(--accent); opacity: 0.38; transform: skewX(-20deg); border-radius: 1px; transition: opacity 160ms ease; }
.sk:hover .sk-mark i { opacity: 1; }
.sk-name { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 500; letter-spacing: -0.005em; color: var(--text-primary); line-height: 1.3; }
.sk-add { flex: none; display: inline-flex; align-items: center; gap: 7px; opacity: 0; transition: opacity 160ms ease; }
.sk:hover .sk-add, .sk:focus-visible .sk-add { opacity: 1; }
.sk-add-txt { font-family: var(--font-mono); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }
.sk-plus { display: inline-flex; align-items: center; justify-content: center; width: 19px; height: 19px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 14px; font-weight: 500; line-height: 1; }

/* ── Empty state + footnote ──────────────────────────── */
.mkt-empty { margin-top: 36px; text-align: center; padding: 46px 24px; border: 1px dashed var(--border-default); border-radius: 14px; font-size: 15px; color: var(--text-secondary); }
.mkt-empty b { color: var(--text-primary); font-weight: 600; }
.mkt-foot { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--border-subtle); font-size: 14px; line-height: 1.6; color: var(--text-secondary); max-width: 70ch; }
.mkt-foot-soon { color: var(--text-tertiary); }

/* ── Related service lines (cross-nav at page foot) ──── */
.sd-related { border-top: 1px solid var(--border-default); }
.sd-related-grid { margin-top: 48px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--border-default); }
.sd-related-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 26px 28px 26px 0; border-bottom: 1px solid var(--border-subtle); text-decoration: none; position: relative; transition: padding-left 200ms ease; }
.sd-related-row:nth-child(even) { padding-left: 28px; }
.sd-related-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); transition: width 200ms ease; }
.sd-related-row:nth-child(even)::before { left: 28px; }
.sd-related-row:hover { padding-left: 16px; }
.sd-related-row:nth-child(even):hover { padding-left: 44px; }
.sd-related-row:hover::before { width: 3px; }
.sd-related-row .srr-l { display: flex; align-items: baseline; gap: 14px; }
.sd-related-row .srn { font-family: var(--font-mono); font-size: 12px; color: var(--text-tertiary); }
.sd-related-row .srt { font-size: 17px; font-weight: 600; letter-spacing: -0.012em; color: var(--text-primary); }
.sd-related-row .arr { color: var(--accent); transition: transform 160ms cubic-bezier(.4,0,.2,1); }
.sd-related-row:hover .arr { transform: translateX(4px); }

/* h2 accent emphasis inside the marketplace head */
.sd-library .h2 em { font-family: var(--font-sans); font-style: normal; font-weight: 600; color: var(--accent); letter-spacing: -0.005em; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 1040px) {
  .sd-hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .sd-problem-grid { grid-template-columns: 1fr; gap: 30px; }
  .lib-agent { flex-direction: column; gap: 6px; }
  .mkt-toolbar { position: static; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .mkt-agent-head { flex-wrap: wrap; }
  .mkt-agent-ct { margin-left: 0; flex-basis: 100%; padding-top: 4px; }
  .sd-related-grid { grid-template-columns: 1fr; }
  .sd-related-row, .sd-related-row:nth-child(even) { padding-left: 0; }
  .sd-related-row:nth-child(even)::before { left: 0; }
  .sd-related-row:nth-child(even):hover { padding-left: 16px; }
}
@media (max-width: 680px) {
  .cat-grid { grid-template-columns: 1fr; }
  .sd-h1 { font-size: clamp(28px, 7vw, 36px); }
  .mkt-grid { grid-template-columns: 1fr; }
  .sk-add { opacity: 1; }
}

/* Reveal helper already defined in services.css/.js (.reveal, [data-stagger]) */
