/* Native Section style: open product stories below the photographic hero. */
.k-section.is-style-open-story {
  --open-story-ink: #0B0B0C;
  --open-story-body: #52525B;
  --open-story-rule: #E4E4E7;
  width: 100%;
  max-width: none;
  padding: var(--section-space-top, 0px) 0 var(--section-space-bottom, 0px);
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  color: var(--open-story-ink);
  font-family: var(--wp--preset--font-family--grotesk);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: normal;
  text-align: left;
  -webkit-font-smoothing: antialiased;
}
.k-section.is-style-open-story::before { content: none; }
.k-section.is-style-open-story.k-section--bg-surface { background: var(--surface); box-shadow: none; }
.k-section.is-style-open-story.k-section--bg-clay { background: var(--soft); }
.k-section.is-style-open-story.k-section--bg-dark {
  --open-story-ink: #fff;
  --open-story-body: #D4D4D8;
  --open-story-rule: rgba(255, 255, 255, .18);
  background: #0B0B0C;
}
.k-section.is-style-open-story > .k-wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 0 var(--gutter);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.k-section.is-style-open-story :is(h2, h3, h4) {
  color: var(--open-story-ink);
  font-family: inherit;
  font-weight: var(--display-weight);
  line-height: 1.04;
  letter-spacing: var(--display-tracking);
  text-wrap: balance;
  /* Heading sizes remain the fluid values authored in the native blocks. */
}
.k-section.is-style-open-story :is(.k-label, .k-intro__label) {
  display: block;
  width: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--open-story-body);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .01em;
  text-transform: none;
}
.k-section.is-style-open-story .k-intro__label { margin: 0 0 20px; }
.k-section.is-style-open-story .k-intro {
  display: block;
  width: 100%;
  min-width: 0;
}
.k-section.is-style-open-story .k-intro h2 { margin: 0; }
.k-section.is-style-open-story :is(.k-lede, .k-small) {
  color: var(--open-story-body);
  font-family: inherit;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: normal;
  text-wrap: pretty;
}
.k-section.is-style-open-story .k-intro .k-lede { margin-top: 24px; }
/* A centered introduction above a standalone product screenshot. */
.k-section.is-style-open-story .k-intro.is-style-product-introduction {
  max-width: 900px;
  margin-inline: auto;
  text-align: center;
}
.k-section.is-style-open-story .k-intro.is-style-product-introduction .k-lede {
  max-width: 780px;
  margin-inline: auto;
}
/* A single closing passage beneath the standalone product screenshot. */
.k-section.is-style-open-story p.is-style-product-note {
  max-width: 720px;
  margin: 0 auto;
  color: var(--open-story-body);
  font-family: inherit;
  text-align: center;
  font-size: clamp(20px, 1.875vw, 24px);
  font-weight: var(--display-weight);
  line-height: 1.4;
  letter-spacing: var(--display-tracking);
  text-wrap: balance;
}
.k-section.is-style-open-story p.is-style-product-note strong {
  color: var(--open-story-ink);
  font-weight: 600;
}
.k-section.is-style-open-story .k-link {
  width: fit-content;
  color: var(--signal);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: normal;
}
.k-section.is-style-open-story.k-section--bg-dark .k-link { color: #A9A2F7; }

/* Flex keeps the authored flip working through the theme's grid breakpoint. */
.k-section.is-style-open-story .k-split {
  display: flex;
  align-items: center;
  gap: clamp(48px, 5vw, 72px);
}
.k-section.is-style-open-story .k-split > :is(.k-stack, .k-intro) {
  flex: .9 1 0%;
  min-width: 0;
}
.k-section.is-style-open-story .k-split > :is(.k-figure, .k-skills-network, .wp-block-kempu-skills-network, .k-work-scene) {
  flex: 1.1 1 0%;
  min-width: 0;
}
.k-section.is-style-open-story .k-split--even > :is(.k-stack, .k-intro, .k-figure, .k-skills-network, .wp-block-kempu-skills-network, .k-work-scene) { flex: 1 1 0%; }
.k-section.is-style-open-story .k-split--flip > :is(.k-figure, .k-skills-network, .wp-block-kempu-skills-network, .k-work-scene) { order: -1; }
.k-section.is-style-open-story .k-split--top { align-items: flex-start; }
.k-section.is-style-open-story .k-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  gap: 28px;
}

/* The screenshot itself owns its frame; no extra tinted surround. */
.k-section.is-style-open-story .k-figure {
  width: 100%;
  min-width: 0;
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.k-section.is-style-open-story .k-figure .k-shot {
  padding: 0;
  background: transparent;
  box-shadow: none;
}
.k-section.is-style-open-story .k-figure:not(.k-figure--plain) .k-shot {
  border: 1px solid var(--open-story-rule);
  border-radius: var(--radius-media, 10px);
  background: #fff;
  box-shadow: 0 2px 6px rgba(29, 29, 31, .025), 0 16px 40px rgba(29, 29, 31, .055);
}
.k-section.is-style-open-story .k-figure--plain .k-shot { border: 0; border-radius: 0; }
.k-section.is-style-open-story .k-shot img { display: block; width: 100%; height: auto; }
.k-section.is-style-open-story .k-figure figcaption {
  max-width: 72ch;
  margin: 16px 0 0;
  padding: 0;
  color: var(--open-story-body);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
}
.k-section.is-style-open-story .k-figure figcaption strong { color: var(--open-story-ink); }

/* Preserve the original three-item summary layout on an open white section. */
.k-section.is-style-open-story:has(> .k-wrap > .k-grid.is-style-summary) { background: #fff; }
.k-section.is-style-open-story .k-grid.is-style-summary > .k-feature h4 {
  color: var(--open-story-ink);
  font-family: inherit;
  font-weight: var(--display-weight);
  line-height: 1.04;
  letter-spacing: var(--display-tracking);
}
.k-section.is-style-open-story .k-grid.is-style-summary > .k-feature .k-small {
  color: var(--open-story-body);
  font-family: inherit;
  font-size: 18px;
  line-height: 1.5;
}
.k-section.is-style-open-story .k-grid.is-style-summary > .k-feature + .k-feature {
  border-left: 1px solid var(--open-story-rule);
  padding-left: 32px;
}

/* The diagram owns its palette and inherits the surrounding typography. */
.k-section.is-style-open-story .k-skills-network {
  font-family: inherit;
}

/* An authored Split style gives one workflow room to be read in detail. */
.k-section.is-style-open-story .k-split.is-style-spotlight {
  flex-direction: column;
  align-items: center;
  gap: 48px;
}
.k-section.is-style-open-story .k-split.is-style-spotlight > .k-stack {
  flex: 0 1 auto;
  width: 100%;
  max-width: 760px;
  align-items: center;
  text-align: center;
}
.k-section.is-style-open-story .k-split.is-style-spotlight .k-intro {
  max-width: 760px;
  text-align: center;
}
.k-section.is-style-open-story .k-split.is-style-spotlight .k-intro h2 { max-width: none; }
.k-section.is-style-open-story .k-split.is-style-spotlight .k-lede {
  max-width: 680px;
  margin-inline: auto;
}
.k-section.is-style-open-story .k-split.is-style-spotlight > .k-figure {
  flex: 0 1 auto;
  width: 100%;
  max-width: 1080px;
  order: 0;
}
.k-section.is-style-open-story.k-section--bg-dark .k-figure:not(.k-figure--plain) .k-shot {
  box-shadow: 0 16px 56px rgba(0, 0, 0, .28);
}
.k-section.is-style-open-story .k-split.is-style-spotlight figcaption {
  max-width: none;
  text-align: center;
}

/* Logos form a calm, centered list, including when the native marquee is used. */
.k-section.is-style-open-story .k-marq {
  width: 100%;
  max-width: none;
  margin: 0;
  overflow: visible;
  -webkit-mask-image: none;
  mask-image: none;
}
.k-section.is-style-open-story .k-marq-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px 44px;
  width: 100%;
  padding: 0;
  animation: none;
  transform: none;
}
.k-section.is-style-open-story .k-marq-row > [aria-hidden="true"] { display: none; }
.k-section.is-style-open-story .k-marq-row img { width: auto; max-width: 112px; height: 30px; object-fit: contain; }
.k-section.is-style-open-story .k-marq__head { display: block; max-width: 720px; margin: 0 auto 32px; text-align: center; }
.k-section.is-style-open-story .k-marquee .k-marq__head h3 { font-family: inherit; font-weight: 500; }
.k-section.is-style-open-story .k-marq__head p { max-width: 58ch; margin: 12px auto 0; text-align: center; }
.k-section.is-style-open-story .k-marquee > .k-small { margin-inline: auto; text-align: center; }
.k-section.is-style-open-story:has(> .k-wrap > .k-marquee) > .k-wrap > .k-link { display: flex; margin-inline: auto; }

/* The closing invitation is part of the page, with no enclosing card. */
.k-section.is-style-open-story:has(> .k-wrap > .k-cta) { position: relative; }
.k-section.is-style-open-story:has(> .k-wrap > .k-cta)::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  width: calc(100% - var(--gutter) * 2);
  max-width: calc(var(--wrap) - var(--gutter) * 2);
  height: 1px;
  margin-inline: auto;
  background: var(--open-story-rule);
  pointer-events: none;
}
.k-section.is-style-open-story .k-cta { text-align: left; }
.k-section.is-style-open-story .k-cta__inner {
  display: grid;
  grid-template-columns: minmax(0, 760px) auto;
  column-gap: 64px;
  align-items: center;
  max-width: none;
  margin: 0;
  padding: 0;
}
.k-section.is-style-open-story .k-cta__inner > :is(h2, .k-lede, .k-cta__steps) { grid-column: 1; }
.k-section.is-style-open-story .k-cta .k-lede { margin-inline: 0; }
.k-section.is-style-open-story .k-cta .k-actions {
  grid-column: 2;
  grid-row: 1 / span 2;
  justify-content: flex-end;
  margin: 0;
}
.k-section.is-style-open-story .k-cta__inner > .block-editor-block-list__layout {
  grid-column: 2;
  grid-row: 1 / span 2;
}
.k-section.is-style-open-story .k-cta__steps { justify-content: flex-start; }
.k-section.is-style-open-story .k-cta :is(.k-src, .k-tiny) {
  color: var(--open-story-body);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
}
.k-section.is-style-open-story .k-btn {
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: normal;
}
.k-section.is-style-open-story .k-btn:is(.k-btn--dark, .k-btn--onlight) { background: var(--clay); color: #fff; }
.k-section.is-style-open-story .k-btn:is(.k-btn--dark, .k-btn--onlight):hover { background: var(--signal); color: #fff; }
.k-section.is-style-open-story .k-btn--ondark { border-color: #b9c0bb; background: transparent; color: var(--open-story-ink); }
.k-section.is-style-open-story .k-btn--ondark:hover { background: #f3f5f3; color: var(--open-story-ink); }
.k-section.is-style-open-story :is(.k-link, .k-btn, .k-shot-link):focus-visible { outline: 3px solid var(--signal); outline-offset: 4px; }
.k-section.is-style-open-story .k-shot-link:focus-visible { outline-offset: -3px; }

@media (max-width: 900px) {
  .k-section.is-style-open-story {
    padding-top: min(var(--section-space-top, 0px), 48px);
    padding-bottom: min(var(--section-space-bottom, 0px), 48px);
  }
  .k-section.is-style-open-story > .k-wrap { padding-inline: 24px; }
  .k-section.is-style-open-story:has(> .k-wrap > .k-cta)::before { width: calc(100% - 48px); }
  .k-section.is-style-open-story .k-split { flex-direction: column; align-items: stretch; gap: 36px; }
  .k-section.is-style-open-story .k-split > :is(.k-stack, .k-intro, .k-figure, .k-skills-network, .wp-block-kempu-skills-network, .k-work-scene) {
    flex: 0 1 auto;
    width: 100%;
    order: 0;
  }
  .k-section.is-style-open-story .k-split > :is(.k-stack, .k-intro) { order: -1; }
  .k-section.is-style-open-story .k-intro { max-width: 680px; }
  .k-section.is-style-open-story .k-intro .k-lede { max-width: 52ch; }
  .k-section.is-style-open-story .k-grid.is-style-summary > .k-feature + .k-feature {
    border-left: 0;
    padding-left: 0;
  }
  .k-section.is-style-open-story .k-split.is-style-spotlight { gap: 36px; }
  .k-section.is-style-open-story .k-split.is-style-spotlight > .k-stack { align-items: flex-start; text-align: left; }
  .k-section.is-style-open-story .k-split.is-style-spotlight .k-intro { text-align: left; }
  .k-section.is-style-open-story .k-split.is-style-spotlight .k-lede { margin-inline: 0; }
  .k-section.is-style-open-story .k-split.is-style-spotlight figcaption { text-align: left; }
  .k-section.is-style-open-story .k-cta__inner { display: block; }
  .k-section.is-style-open-story .k-cta .k-actions { justify-content: flex-start; margin-top: 28px; }
  .k-section.is-style-open-story .k-marq-row { gap: 24px 28px; }
  .k-section.is-style-open-story .k-marq-row img { width: calc((100% - 56px) / 3); max-width: 100px; height: 26px; }
}

/* ── The closing band ──────────────────────────────────────────────────
   This band used to be the warm surface: `--surface` was #FFFCF7, so
   `k-section--bg-surface` drew a cream field the eye could see. With the
   ground neutral that same rule paints white on white, and the page's last
   statement becomes a heading floating over nothing. A band that carries
   weight needs a material, so the close is a plate — the same dark stock
   the hero and the diagram are on, which also gives the page three
   deliberate dark moments instead of one endless sheet. */
.k-section.is-style-open-story:has(> .k-wrap > .k-cta) {
  position: relative;
  isolation: isolate;
  margin-block: 24px;
  padding-block: 112px;
  background: transparent;
  --open-story-ink: #fff;
  --open-story-body: rgba(255, 255, 255, .82);
  --open-story-rule: rgba(255, 255, 255, .18);
  --focus-ring: var(--signal-lit);
  color: #fff;
}
/* This pseudo-element already drew the hairline that used to separate the
   closing band from the section above it. The plate replaces that rule
   rather than sitting beside it, so the earlier width/height have to be
   released explicitly or the plate renders one pixel tall. */
.k-section.is-style-open-story:has(> .k-wrap > .k-cta)::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 var(--band-edge);
  width: auto;
  max-width: none;
  height: auto;
  margin: 0;
  border-radius: var(--radius-band);
  background: var(--plate-close);
  box-shadow: var(--plate-gloss), var(--plate-lift);
  pointer-events: none;
}
.k-section.is-style-open-story:has(> .k-wrap > .k-cta) :is(h2, h3) { color: #fff; }
.k-section.is-style-open-story:has(> .k-wrap > .k-cta) :is(.k-lede, .k-small, p) { color: rgba(255, 255, 255, .82); }
.k-section.is-style-open-story:has(> .k-wrap > .k-cta) :is(.k-src, .k-tiny, .k-label) { color: rgba(255, 255, 255, .60); }
.k-section.is-style-open-story:has(> .k-wrap > .k-cta) .k-btn:is(.k-btn--onlight, .k-btn--dark) { background: #fff; color: #0B0B0C; }
.k-section.is-style-open-story:has(> .k-wrap > .k-cta) .k-btn:is(.k-btn--onlight, .k-btn--dark):hover { background: #E4E4E7; color: #0B0B0C; }
.k-section.is-style-open-story:has(> .k-wrap > .k-cta) .k-btn:is(.k-btn--ondark, .k-btn--line) { border-color: rgba(255, 255, 255, .3); color: #fff; background: transparent; }
.k-section.is-style-open-story:has(> .k-wrap > .k-cta) .k-btn:is(.k-btn--ondark, .k-btn--line):hover { background: rgba(255, 255, 255, .12); }
.k-section.is-style-open-story:has(> .k-wrap > .k-cta) .k-link { color: var(--signal-lit); }

/* ── Story runs on sub-pages ───────────────────────────────────────────
   A solution or role page tells its story as four or so text-and-screen
   sections in a row. Left to their natural sizes, a tall service map sits
   beside one section and a short wiki strip beside the next, and the run
   reads as unrelated blocks. Here every one of them is the same shape: the
   text in one column, and the media in a square stage of the same size,
   showing its screen the way a feature card does — a window from the top
   left corner, the rest a click away in the enlarged view. The sections
   are numbered, so a run reads as one ordered story. The homepage keeps its
   own composition. */
body:not(.home) { counter-reset: k-chapter; }
body:not(.home) .k-section.is-style-open-story:has(> .k-wrap > .k-split:not(.is-style-spotlight) > .k-stack) {
  --stage-pad: clamp(28px, 3.4vw, 48px);
  counter-increment: k-chapter;
  padding-block: clamp(48px, 6vw, 88px);
}
body:not(.home) .k-section.is-style-open-story > .k-wrap > .k-split:not(.is-style-spotlight):has(> .k-stack) {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: clamp(40px, 6vw, 88px);
}
body:not(.home) .k-section.is-style-open-story > .k-wrap > .k-split--flip:not(.is-style-spotlight):has(> .k-stack) { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
body:not(.home) .k-section.is-style-open-story > .k-wrap > .k-split:not(.is-style-spotlight):has(> .k-stack) > * { width: auto; }

/* The number before the label; read by the eye only. */
body:not(.home) .k-section.is-style-open-story:is(:has(+ .k-section.is-style-open-story > .k-wrap > .k-split > .k-stack), .k-section.is-style-open-story:has(> .k-wrap > .k-split > .k-stack) + *):has(> .k-wrap > .k-split:not(.is-style-spotlight) > .k-stack) .k-split > .k-stack .k-intro__label::before {
  content: counter(k-chapter, decimal-leading-zero) / "";
  display: inline-block;
  min-width: 2.4em;
  margin-right: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--panel);
  color: var(--signal);
  font-family: var(--wp--preset--font-family--mono, ui-monospace, monospace);
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  letter-spacing: .02em;
}

/* One stage for every kind of media: a screenshot, a workplace scene or
   the skills diagram. */
body:not(.home) .k-section.is-style-open-story .k-split:not(.is-style-spotlight) > :is(.k-figure, .k-work-scene) {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 24px;
}
body:not(.home) .k-section.is-style-open-story .k-split:not(.is-style-spotlight) > .k-figure { background: var(--stage); }
body:not(.home) .k-section.is-style-open-story .k-split:not(.is-style-spotlight) > .k-figure > .k-shot {
  position: absolute;
  inset: var(--stage-pad) 0 0 var(--stage-pad);
  overflow: hidden;
  border-right: 0;
  border-bottom: 0;
  border-radius: 12px 0 0 0;
  box-shadow: 0 24px 60px -18px rgba(37, 30, 120, .28);
}
body:not(.home) .k-section.is-style-open-story .k-split:not(.is-style-spotlight) > .k-figure > .k-shot :is(.k-shot-link, img) {
  display: block;
  width: 100%;
  height: 100%;
}
body:not(.home) .k-section.is-style-open-story .k-split:not(.is-style-spotlight) > .k-figure > .k-shot img {
  object-fit: cover;
  object-position: left top;
}
/* A workplace scene fills the stage with its photograph; the product
   screen lands on its lower right and runs off the stage's edges. */
body:not(.home) .k-section.is-style-open-story .k-split:not(.is-style-spotlight) > .k-work-scene { --scene-radius: 24px; }
body:not(.home) .k-section.is-style-open-story .k-split:not(.is-style-spotlight) > .k-work-scene .k-work-scene__photo {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
}
body:not(.home) .k-section.is-style-open-story .k-split:not(.is-style-spotlight) > .k-work-scene .k-work-scene__product {
  position: absolute;
  top: 54%;
  left: 22%;
  right: 0;
  bottom: 0;
  width: auto;
  margin: 0;
}
body:not(.home) .k-section.is-style-open-story .k-split:not(.is-style-spotlight) > .k-work-scene .k-work-scene__product .k-shot {
  height: 100%;
  overflow: hidden;
  border-right: 0;
  border-bottom: 0;
  border-radius: 12px 0 0 0;
}
body:not(.home) .k-section.is-style-open-story .k-split:not(.is-style-spotlight) > .k-work-scene .k-work-scene__product :is(.k-figure, .k-shot-link) { height: 100%; }
/* A screenshot's own size cap (for its place elsewhere) gives way to the stage. */
body:not(.home) .k-section.is-style-open-story .k-split:not(.is-style-spotlight) > .k-figure,
body:not(.home) .k-section.is-style-open-story .k-split:not(.is-style-spotlight) .k-work-scene__product > .k-figure { max-width: none !important; margin: 0; padding: 0 !important; }
body:not(.home) .k-section.is-style-open-story .k-split:not(.is-style-spotlight) .k-work-scene__product .k-shot { max-width: none !important; padding: 0 !important; }
body:not(.home) .k-section.is-style-open-story .k-split:not(.is-style-spotlight) > .k-work-scene .k-work-scene__product img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left top;
}
/* The skills diagram is its own dark plate; it fills the same stage. */
body:not(.home) .k-section.is-style-open-story .k-split:not(.is-style-spotlight) > :is(.k-skills-network, .wp-block-kempu-skills-network) { align-self: stretch; }

@media (max-width: 900px) {
  body:not(.home) .k-section.is-style-open-story > .k-wrap > .k-split:not(.is-style-spotlight):has(> .k-stack),
  body:not(.home) .k-section.is-style-open-story > .k-wrap > .k-split--flip:not(.is-style-spotlight):has(> .k-stack) { display: flex; align-items: stretch; }
  body:not(.home) .k-section.is-style-open-story .k-split:not(.is-style-spotlight) > :is(.k-figure, .k-work-scene) { aspect-ratio: 4 / 3; border-radius: 20px; }
}
@media (max-width: 600px) {
  body:not(.home) .k-section.is-style-open-story .k-split:not(.is-style-spotlight) > :is(.k-figure, .k-work-scene) { aspect-ratio: 1 / 1; }
  body:not(.home) .k-section.is-style-open-story .k-split:not(.is-style-spotlight) > .k-work-scene .k-work-scene__product { top: 48%; left: 12%; }
}
