/* ============================================================
   BSKL — CAPABILITIES PAGE (capability archive / pages)
   Loaded only on the `capability` post type archive. Scoped to the
   existing design system: reuses .section, .grid, .card, .split,
   .page-hero, .cta-section, .list-check, .btn. Only new page-level
   pieces are defined here.
   ============================================================ */

/* ===== ALTERNATING SECTION BACKGROUND ===== */
.cap-alt { background: var(--surface-2); }

/* ===== SECTION 1 · HERO IMAGE ===== */
/* The photo replaces the hero's gradient image layer via inline
   background-image, so it needs cover sizing (the base .page-hero .ph-bg rule
   only defines gradients). Scoped here to the capability archive. */
.page-hero .ph-bg { background-size: cover; background-position: center; }

/* ===== SECTION 2 · BSKL AT A GLANCE ===== */
.cap-glance { margin-top: clamp(28px, 4vw, 48px); }
.cap-glance-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(22px, 2.4vw, 34px) clamp(16px, 2vw, 24px);
}
.cap-glance-num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--teal);
}
.cap-glance-label {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  line-height: 1.4;
}

/* ===== SECTION 3 · CORE CAPABILITY CARDS ===== */
.cap-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--teal);
}
.cap-more i { transition: transform 0.3s var(--ease); }
.card-link:hover .cap-more i { transform: translateX(4px); }

/* ===== SECTIONS 4–8 · SPOTLIGHTS ===== */
.cap-text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
}
.cap-text-link:hover { color: var(--teal); }
.cap-text-link i { font-size: 0.72rem; }
.split ul.list-check + .cap-spot-actions { margin-top: 22px; }

/* ===== BADGES (page-scoped parity with machinery/product cards) ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  margin-top: 12px;
  margin-right: 6px;
  border-radius: 100px;
  background: var(--surface-2);
  color: var(--navy);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge i { color: var(--teal); font-size: 0.68rem; }
.badge-teal { background: rgba(14, 143, 139, 0.12); color: var(--teal-dark); }
.badge-muted { background: var(--surface-3); color: var(--muted); }

/* Machinery cards inside this page get a little breathing room */
#machinery .card .media { margin: -6px 0 18px; }

/* ===== SECTION 10 · MANUFACTURING FLOW ===== */
.cap-flow {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(12px, 1.6vw, 20px);
  list-style: none;
  margin: 0;
  padding: 0;
}
.cap-flow-step { margin: 0; }
.cap-flow-step a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 152px;
  min-height: 150px;
  padding: 22px 14px;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  color: var(--navy);
  text-align: center;
  transition: all 0.3s var(--ease);
}
.cap-flow-step a:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  color: var(--navy);
}
.cap-flow-icon {
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(24, 166, 160, 0.14), rgba(24, 166, 160, 0.05));
  border: 1px solid rgba(24, 166, 160, 0.18);
  color: var(--teal);
  font-size: 1.15rem;
}
.cap-flow-label {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
}
.cap-flow-note {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 9px;
  max-width: 72ch;
  margin: 28px auto 0;
  font-size: 0.9rem;
  text-align: left;
}
.cap-flow-note i { color: var(--teal); margin-top: 4px; flex-shrink: 0; }

/* ===== SECTION 11 · QUALITY STAGE CARDS ===== */
#quality-stages .card h4 { margin-top: 4px; }

/* ===== SECTION 12 · BUYER TOPICS (two-column check list) ===== */
.cap-topics { column-count: 2; column-gap: clamp(28px, 4vw, 48px); }
.cap-topics li { break-inside: avoid; }

/* ===== SECTION 13 · RELATED RESOURCES ===== */
.cap-resources .card-icon { margin-left: auto; margin-right: auto; }
.cap-resources h4 { margin: 0; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .cap-flow-step a { width: 140px; min-height: 140px; }
}
@media (max-width: 640px) {
  .cap-glance { grid-template-columns: 1fr; }
  .cap-topics { column-count: 1; }
  .cap-flow { flex-direction: column; align-items: stretch; }
  .cap-flow-step a {
    width: 100%;
    min-height: 0;
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 16px;
    padding: 16px 18px;
  }
}
