/* ==========================================================================
   KDC — components.css
   Buttons, cards, the stencil chip register, breadcrumb, prose, tables,
   forms, the partner wall and the certificate plate.
   ========================================================================== */

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 24px;
  font-family: var(--font-body);
  font-size: var(--fs-nav); font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--dur-hover) var(--ease),
              color var(--dur-hover) var(--ease),
              border-color var(--dur-hover) var(--ease),
              transform var(--dur-hover) var(--ease);
}
.btn svg { flex: none; transition: transform var(--dur-hover) var(--ease); }
.btn:hover svg { transform: translateX(3px); }

.btn--primary { background: var(--green); color: #fff; }
.btn--primary:hover { background: var(--green-deep); color: #fff; transform: translateY(-1px); }

.btn--blue { background: var(--ultra); color: #fff; }
.btn--blue:hover { background: var(--deep); color: #fff; transform: translateY(-1px); }

.btn--ghost { border-color: rgb(255 255 255 / 0.42); color: #fff; background: transparent; }
.btn--ghost:hover { border-color: #fff; background: rgb(255 255 255 / 0.1); color: #fff; }

.btn--outline { border-color: var(--line-strong); color: var(--ultra); background: var(--paper); }
.btn--outline:hover { border-color: var(--ultra); background: var(--mist); color: var(--ultra); }

/* A quiet inline link with a moving chevron — used at the foot of cards. */
.link-more {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-label); font-weight: 500;
  letter-spacing: var(--track-utility); text-transform: uppercase;
  color: var(--green-deep); text-decoration: none;
}
.link-more svg { transition: transform var(--dur-hover) var(--ease); }
.link-more:hover { color: var(--ultra); }
.link-more:hover svg { transform: translateX(4px); }

/* --- The stencil chip register -------------------------------------------- */
/* Every chemistry the source lists, set the way it is stencilled on a drum:
   mono, uppercase, inside a plate. The list is verbatim; only its form changes. */
.chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 26px;
}
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px 7px 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-micro); font-weight: 500;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}
.chip::before {
  content: ""; flex: none;
  width: 7px; height: 7px;
  border: 1.5px solid var(--green);
}
.section--mist .chip { background: var(--paper); }

/* --- Cards ---------------------------------------------------------------- */
.grid { display: grid; gap: 24px; grid-template-columns: 1fr; }

.card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--dur-hover) var(--ease),
              box-shadow var(--dur-hover) var(--ease),
              transform var(--dur-hover) var(--ease);
}
.card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lift);
  transform: translateY(-3px);
}

.card-media { position: relative; aspect-ratio: 400 / 227; background: var(--mist); overflow: hidden; }
.card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 520ms var(--ease);
}
.card:hover .card-media img { transform: scale(1.04); }

.card-body { display: flex; flex-direction: column; gap: 12px; padding: 24px 24px 26px; flex: 1; }
.card-kicker {
  font-family: var(--font-mono);
  font-size: var(--fs-micro); font-weight: 500;
  letter-spacing: var(--track-utility); text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}
a.card-kicker:hover { color: var(--green-deep); }
/* The card title is h2 where the cards are the page's own content and h3 where
   they sit under a section heading, so both levels take the same treatment. */
.card-body h2, .card-body h3 { font-size: 1.375rem; }
.card-body h2 a, .card-body h3 a { color: inherit; text-decoration: none; }
.card-body h2 a::after, .card-body h3 a::after { content: ""; position: absolute; inset: 0; }
.card:hover .card-body h2 a, .card:hover .card-body h3 a { color: var(--green-deep); }
.card-body p { color: var(--muted); font-size: var(--fs-fine); }
.card-foot { margin-top: auto; padding-top: 8px; }

/* --- Register (the services capability list) ------------------------------ */
/* Five statements, flat and unordered on the source — so no numbering here.
   Each takes the boxed-letter motif as its marker. */
.register { border-top: 1px solid var(--line); margin-top: 34px; }
.register li {
  display: grid; grid-template-columns: 22px 1fr; gap: 16px;
  align-items: start;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.register li::before {
  content: ""; margin-top: 0.55em;
  width: 11px; height: 11px;
  border: 2px solid var(--green);
}
.register p { max-width: 68ch; }

/* --- Prose ---------------------------------------------------------------- */
.prose { font-size: var(--fs-body); color: var(--ink); }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose a { color: var(--ultra); }

/* --- Split layouts -------------------------------------------------------- */
.split { display: grid; gap: 40px; grid-template-columns: 1fr; align-items: start; }
/* For a short text column set against a tall figure, where top alignment would
   leave the heading stranded above a block of empty space. */
.split--middle { align-items: center; }
.split-figure { margin: 0; }
.split-figure img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--mist);
}
/* Two of the source images are only 250px square. Upscaling them to a full
   column costs real sharpness, so they sit at natural size and centre. */
.split-figure--sm { display: flex; justify-content: center; }
.split-figure--sm img { width: auto; max-width: 100%; }

.split-figure figcaption {
  margin-top: 12px;
  font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: 0.04em; color: var(--muted);
}

/* --- Breadcrumb ----------------------------------------------------------- */
.breadcrumb {
  font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: 0.06em;
  margin-bottom: 22px;
}
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.breadcrumb a { color: rgb(230 232 246 / 0.8); text-decoration: none; }
.breadcrumb a:hover { color: var(--green-lift); text-decoration: underline; }
.breadcrumb li + li::before { content: "/"; margin-right: 10px; color: rgb(230 232 246 / 0.42); }
.breadcrumb [aria-current="page"] { color: #fff; }

/* --- Partner wall --------------------------------------------------------- */
.partner-wall {
  display: grid; gap: 1px;
  grid-template-columns: repeat(2, 1fr);
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
/* A two-row grid rather than a centred stack, so every partner name lands on
   the same line however tall or wide its logo happens to be. The source logos
   are mixed formats with baked-in backgrounds, so no greyscale treatment is
   applied — it would only turn those backgrounds into grey plates. */
.partner {
  display: grid; grid-template-rows: 1fr auto;
  align-items: center; justify-items: center;
  gap: 14px;
  min-height: 152px; padding: 24px 18px;
  background: var(--paper);
  transition: background var(--dur-hover) var(--ease);
}
.partner:hover { background: var(--mist); }
.partner img {
  max-height: 52px; width: auto; max-width: 100%;
  object-fit: contain;
}
.partner span {
  font-family: var(--font-mono); font-size: var(--fs-micro);
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); text-align: center;
}

/* --- Certificate plate ---------------------------------------------------- */
.cert {
  display: grid; gap: 0; grid-template-columns: 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
}
.cert-figure { margin: 0; background: var(--mist); padding: 26px; display: flex; justify-content: center; }
.cert-figure a { display: block; line-height: 0; }
.cert-figure img {
  width: 100%; max-width: 340px;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-card);
  transition: transform var(--dur-hover) var(--ease), box-shadow var(--dur-hover) var(--ease);
}
.cert-figure a:hover img { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.cert-detail { padding: 32px 28px; border-top: 1px solid var(--line); }
.cert-detail dl { margin-top: 22px; }
.cert-detail dt {
  font-family: var(--font-mono); font-size: var(--fs-micro);
  letter-spacing: var(--track-utility); text-transform: uppercase;
  color: var(--muted);
}
.cert-detail dd { margin: 5px 0 18px; font-weight: 500; }
.cert-detail .btn { margin-top: 6px; }

/* --- Data table ----------------------------------------------------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: var(--fs-fine); }
.data-table th, .data-table td {
  padding: 14px 16px; text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.data-table th {
  font-family: var(--font-mono); font-size: var(--fs-micro);
  font-weight: 500; letter-spacing: var(--track-utility); text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  width: 1%;
}
.data-table td a { font-weight: 500; }
.data-table tr:last-child th, .data-table tr:last-child td { border-bottom: 0; }

/* --- Contact plate -------------------------------------------------------- */
.contact-plate {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
}
.contact-plate h2, .contact-plate h3 { padding: 24px 24px 0; }
.contact-plate .table-wrap { padding: 16px 8px 8px; }

/* --- Form ----------------------------------------------------------------- */
.form { display: grid; gap: 18px; }
.form-row { display: grid; gap: 18px; grid-template-columns: 1fr; }
.field { display: grid; gap: 7px; }
.field label {
  font-family: var(--font-mono); font-size: var(--fs-micro);
  font-weight: 500; letter-spacing: var(--track-utility); text-transform: uppercase;
  color: var(--muted);
}
.field .req { color: var(--green-deep); }
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: var(--fs-nav);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  transition: border-color var(--dur-hover) var(--ease), box-shadow var(--dur-hover) var(--ease);
}
.field textarea { min-height: 148px; resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--ultra);
  box-shadow: 0 0 0 3px rgb(20 35 135 / 0.12);
}
.field input:focus-visible, .field textarea:focus-visible { outline: none; }

.form-note { font-family: var(--font-mono); font-size: var(--fs-label); color: var(--muted); }
.form-status {
  margin: 0; padding: 12px 14px;
  font-size: var(--fs-fine);
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--mist);
}
.form-status[data-state="error"] { border-color: #C6423A; background: #FDF2F1; color: #8E2E27; }
.form-status[data-state="ok"] { border-color: var(--green); background: #EEF9F1; color: var(--green-deep); }

/* --- CTA band ------------------------------------------------------------- */
.cta { padding-block: clamp(56px, 7vw, 88px); }
.cta-inner { display: grid; gap: 28px; align-items: center; grid-template-columns: 1fr; }
.cta h2 { max-width: 18ch; }
.cta p { color: var(--pearl); margin-top: 14px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* --- Prev / next pager ---------------------------------------------------- */
.pager {
  display: grid; gap: 1px; grid-template-columns: 1fr;
  background: var(--line);
  border-block: 1px solid var(--line);
}
.pager a {
  display: flex; flex-direction: column; gap: 6px;
  padding: 24px var(--gutter);
  background: var(--paper);
  text-decoration: none;
  transition: background var(--dur-hover) var(--ease);
}
.pager a:hover { background: var(--mist); }
.pager span {
  font-family: var(--font-mono); font-size: var(--fs-micro);
  letter-spacing: var(--track-utility); text-transform: uppercase;
  color: var(--muted);
}
.pager strong {
  font-family: var(--font-display); font-size: 1.1875rem;
  font-weight: 600; letter-spacing: -0.01em; color: var(--ultra);
}
.pager .pager-next { text-align: right; }

/* --- Lightbox ------------------------------------------------------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 180;
  display: none; align-items: center; justify-content: center;
  padding: 24px;
  background: rgb(14 26 99 / 0.9);
}
.lightbox[data-open="true"] { display: flex; }
.lightbox img {
  max-width: min(94vw, 760px); max-height: 88vh;
  width: auto; height: auto;
  border: 1px solid rgb(255 255 255 / 0.3);
  box-shadow: 0 30px 80px -20px rgb(0 0 0 / 0.6);
}
.lightbox-close {
  position: absolute; top: 18px; right: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  color: #fff;
  border: 1px solid rgb(255 255 255 / 0.34);
  border-radius: var(--radius);
}
.lightbox-close:hover { border-color: var(--green-lift); color: var(--green-lift); }

/* --- Spec line -----------------------------------------------------------
   Four values the source states about itself, set as a single hairline
   record rather than as four big-number tiles. */
.spec-line {
  display: grid; gap: 0;
  grid-template-columns: 1fr;
  margin-top: 48px;
  border-top: 1px solid var(--line);
}
.spec-line li {
  display: flex; flex-direction: column; gap: 5px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.spec-line span {
  font-family: var(--font-mono); font-size: var(--fs-micro);
  letter-spacing: var(--track-utility); text-transform: uppercase;
  color: var(--muted);
}
.spec-line strong {
  font-family: var(--font-display);
  font-size: 1.25rem; font-weight: 600; letter-spacing: -0.015em;
  color: var(--ultra);
}
