/* ==========================================================================
   The Platform — Webflow Component (V3 / V4)
   Statement header + V3 framed container: white plate, 10px inner frame,
   grey panel, ambient glow (same contract as the Solution cards).
   Left column: the product stack as modular blocks. Right column: three
   deployment models with 48px outline icons; 1px stroke kept by
   non-scaling-stroke. A hairline splits the columns.
   Self-contained: does not need base.css. Tokens used with fallbacks.
   Loaded from index.html (V3) and v4.html (V4). V2 keeps platform-v2/.
   ========================================================================== */

.bd-plat3,
.bd-plat3 *,
.bd-plat3 *::before,
.bd-plat3 *::after {
  box-sizing: border-box;
}

.bd-plat3 {
  --bd-plat3-rule: #d5d7da;
  --bd-plat3-panel-bg: #f4f4f4;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 64px 0;
  font-family: var(--bd-font, InterVariable, sans-serif);
  font-feature-settings: "liga" 1, "calt" 1, "cv02", "cv03", "cv04", "cv11";
  font-optical-sizing: auto;
  color: var(--bd-text, #000);
}

.bd-plat3 .bd-wrap {
  width: 100%;
  max-width: var(--bd-content, 1280px);
  margin-inline: auto;
  scroll-margin-top: 104px;
}

/* --- Statement header (same recipe as Solutions intro) --- */

.bd-plat3__intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--bd-space-6, 24px);
  width: 100%;
  margin: 0 0 var(--bd-space-8, 32px);
}

.bd-plat3__intro-copy {
  min-width: 0;
}

.bd-plat3__eyebrow {
  margin: 0 0 var(--bd-space-2, 8px);
  font-size: var(--bd-text-sm, 14px);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--bd-accent, #6434d8);
}

.bd-plat3__title {
  margin: 0;
  font-size: 32px;
  font-weight: var(--bd-weight-heading, 500);
  font-variation-settings: "wght" var(--bd-weight-heading, 500);
  line-height: 1.2;
  color: var(--bd-text, #000);
  hyphens: none;
  overflow-wrap: normal;
}

.bd-plat3__lead {
  margin: var(--bd-space-3, 12px) 0 0;
  max-width: 40rem;
  font-size: var(--bd-text-base, 16px);
  font-weight: 400;
  line-height: 1.5;
  color: var(--bd-text, #000);
}

.bd-plat3__more {
  flex-shrink: 0;
  margin: 0;
  padding-bottom: 0.15em;
  color: var(--bd-link, #2563eb);
  font-size: var(--bd-text-base, 16px);
  font-weight: 400;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.bd-plat3__more:hover {
  opacity: 0.7;
}

.bd-plat3__more:focus-visible {
  outline: 2px solid var(--bd-link, #2563eb);
  outline-offset: 3px;
}

/* --- V3 framed container: white plate, frame, grey panel, glow --- */

.bd-plat3__deck {
  width: 100%;
  min-width: 0;
  padding: var(--bd-v3-frame, 10px);
  background: var(--bd-surface, #fff);
  border-radius: var(--bd-v3-frame-radius, 12px);
  box-shadow: var(
    --bd-v3-glow,
    0 0 12px rgba(16, 24, 40, 0.044),
    0 0 40px rgba(16, 24, 40, 0.044)
  );
}

.bd-plat3__panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  width: 100%;
  min-width: 0;
  padding: clamp(28px, 4vw, 48px);
  background: var(--bd-plat3-panel-bg, #f4f4f4);
  border-radius: var(--bd-v3-frame-in-radius, 8px);
}

.bd-plat3__col {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.bd-plat3__col:first-child {
  padding-right: clamp(24px, 3.5vw, 48px);
}

/* Hairline between stack and deploy, same tone as the stats rules. */
.bd-plat3__col--deploy {
  padding-left: clamp(24px, 3.5vw, 48px);
  border-left: 1px solid var(--bd-plat3-rule, #d5d7da);
}

.bd-plat3__col-label {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  font-variation-settings: "wght" 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--bd-text, #000);
}

.bd-plat3__col-note {
  margin: var(--bd-space-6, 24px) 0 var(--bd-space-8, 32px);
  font-size: var(--bd-text-base, 16px);
  font-weight: 400;
  line-height: 1.5;
  color: var(--bd-text, #000);
}

/* --- Left: product stack as modular white blocks on the grey panel --- */

.bd-plat3__stack {
  display: flex;
  flex-direction: column;
  gap: var(--bd-space-2, 8px);
  min-width: 0;
}

.bd-plat3__mod {
  position: relative;
  min-width: 0;
  padding: var(--bd-space-8, 32px) var(--bd-space-5, 20px);
  background: var(--bd-surface, #fff);
  border-radius: var(--bd-v3-frame-in-radius, 8px);
}

.bd-plat3__stack .bd-plat3__mod:nth-child(1) {
  z-index: 3;
}

.bd-plat3__stack .bd-plat3__mod:nth-child(2) {
  z-index: 2;
}

.bd-plat3__stack .bd-plat3__mod:nth-child(3) {
  z-index: 1;
}

/* Purple plus sits on the 8px seam and overlaps both modules. */
.bd-plat3__mod-join {
  position: absolute;
  left: 50%;
  top: 100%;
  z-index: 1;
  width: 30px;
  height: 30px;
  margin-top: calc(var(--bd-space-2, 8px) / 2);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--bd-accent, #6434d8);
  box-shadow: 0 0 0 2px var(--bd-plat3-panel-bg, #f4f4f4);
  pointer-events: none;
}

.bd-plat3__mod-join::before,
.bd-plat3__mod-join::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
}

.bd-plat3__mod-join::before {
  width: 12px;
  height: 2px;
}

.bd-plat3__mod-join::after {
  width: 2px;
  height: 12px;
}

.bd-plat3__mod-head {
  display: flex;
  align-items: center;
  gap: var(--bd-space-3, 12px);
  margin: 0 0 var(--bd-space-2, 8px);
}

.bd-plat3__mod-icon {
  flex: 0 0 auto;
  display: block;
  width: 24px;
  height: 24px;
  color: var(--bd-text, #000);
  overflow: visible;
}

.bd-plat3__mod-title {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  font-variation-settings: "wght" 500;
  line-height: 1.3;
  color: var(--bd-text, #000);
}

.bd-plat3__mod-copy {
  margin: 0;
  padding-left: calc(24px + var(--bd-space-3, 12px));
  font-size: var(--bd-text-base, 16px);
  font-weight: 400;
  line-height: 1.5;
  color: var(--bd-text, #000);
}

/* --- Right: three deployment models --- */

.bd-plat3__modes {
  display: flex;
  flex-direction: column;
  gap: var(--bd-space-6, 24px);
  min-width: 0;
  flex: 1 1 auto;
}

.bd-plat3__feat {
  display: flex;
  align-items: flex-start;
  gap: var(--bd-space-5, 20px);
  min-width: 0;
}

.bd-plat3__feat-icon {
  flex: 0 0 auto;
  display: block;
  width: 48px;
  height: 48px;
  color: var(--bd-text, #000);
  overflow: visible;
}

/* 48px box on a 24px viewBox: keep the Lucide line at 1 screen pixel. */
.bd-plat3__feat-icon :is(path, circle, line, rect, ellipse, polyline, polygon) {
  vector-effect: non-scaling-stroke;
}

.bd-plat3__feat-body {
  min-width: 0;
}

.bd-plat3__feat-title {
  margin: 0 0 var(--bd-space-2, 8px);
  font-size: 18px;
  font-weight: 500;
  font-variation-settings: "wght" 500;
  line-height: 1.3;
  color: var(--bd-text, #000);
}

.bd-plat3__feat-copy {
  margin: 0;
  font-size: var(--bd-text-base, 16px);
  font-weight: 400;
  line-height: 1.5;
  color: var(--bd-text, #000);
}

/* --- Variant C: plain white card; colour lives on the deploy tiles ----- */
/* No grey panel and no inner frame — the deck itself is the white card.
   Stack modules invert to a grey fill. Each deploy tile gets a thin
   dashed outline and a 1px icon in its own hue (blue / green / purple). */

.bd-plat3--tiles .bd-plat3__deck {
  padding: clamp(28px, 4vw, 48px);
}

.bd-plat3--tiles .bd-plat3__panel {
  grid-template-columns: minmax(0, 40fr) minmax(0, 60fr);
  padding: 0;
  background: transparent;
  border-radius: 0;
  column-gap: clamp(24px, 3.5vw, 48px);
}

/* Same 16px seam on both lists. Below 768 the columns stack and each
   card sizes to its copy; side-by-side pairing is the subgrid below. */
.bd-plat3--tiles .bd-plat3__stack,
.bd-plat3--tiles .bd-plat3__modes {
  display: flex;
  flex-direction: column;
  gap: var(--bd-space-4, 16px);
}

/* Side-by-side: labels and notes on rows 1–2. The three module/tile
   pairs share rows 3/5/7 so each grey card is the same height as the
   deploy tile across from it. Empty 16px tracks are the seams. */
@media (min-width: 768px) {
  .bd-plat3--tiles .bd-plat3__panel {
    grid-template-rows:
      auto
      auto
      auto
      var(--bd-space-4, 16px)
      auto
      var(--bd-space-4, 16px)
      auto;
  }

  .bd-plat3--tiles .bd-plat3__col {
    display: contents;
  }

  .bd-plat3--tiles .bd-plat3__col:first-child > .bd-plat3__col-label,
  .bd-plat3--tiles .bd-plat3__col:first-child > .bd-plat3__col-note,
  .bd-plat3--tiles .bd-plat3__col:first-child > .bd-plat3__stack {
    grid-column: 1;
  }

  .bd-plat3--tiles .bd-plat3__col--deploy > .bd-plat3__col-label,
  .bd-plat3--tiles .bd-plat3__col--deploy > .bd-plat3__col-note,
  .bd-plat3--tiles .bd-plat3__col--deploy > .bd-plat3__modes {
    grid-column: 2;
  }

  .bd-plat3--tiles .bd-plat3__col-label {
    grid-row: 1;
  }

  .bd-plat3--tiles .bd-plat3__col-note {
    grid-row: 2;
  }

  .bd-plat3--tiles .bd-plat3__stack,
  .bd-plat3--tiles .bd-plat3__modes {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: 3 / span 5;
    gap: 0;
  }

  .bd-plat3--tiles .bd-plat3__mod:nth-child(1),
  .bd-plat3--tiles .bd-plat3__feat:nth-child(1) {
    grid-row: 1;
  }

  .bd-plat3--tiles .bd-plat3__mod:nth-child(2),
  .bd-plat3--tiles .bd-plat3__feat:nth-child(2) {
    grid-row: 3;
  }

  .bd-plat3--tiles .bd-plat3__mod:nth-child(3),
  .bd-plat3--tiles .bd-plat3__feat:nth-child(3) {
    grid-row: 5;
  }
}

.bd-plat3--tiles .bd-plat3__col:first-child {
  padding-right: 0;
}

.bd-plat3--tiles .bd-plat3__col--deploy {
  padding-left: 0;
  border-left: 0;
}

/* White card: invert the stack fill so the modules still read as pieces.
   Icon is a 40px box, vertically centered on the text. A hairline splits
   icon and copy. Padding-block matches the deploy tiles. */
.bd-plat3--tiles .bd-plat3__mod {
  display: flex;
  align-items: center;
  gap: var(--bd-space-4, 16px);
  padding-block: var(--bd-space-6, 24px);
  background: #f4f4f4;
}

/* 30px plus sits on the 16px seam (gap / 2) and rings the white deck. */
.bd-plat3--tiles .bd-plat3__mod-join {
  margin-top: calc(var(--bd-space-4, 16px) / 2);
  box-shadow: 0 0 0 2px var(--bd-surface, #fff);
}

.bd-plat3--tiles .bd-plat3__mod-icon-slot {
  position: relative;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  align-self: center;
}

.bd-plat3--tiles .bd-plat3__mod-icon {
  position: static;
  inset: auto;
  display: block;
  width: 40px;
  height: 40px;
  overflow: visible;
}

.bd-plat3--tiles .bd-plat3__mod-icon :is(path, circle, line, rect, ellipse, polyline, polygon) {
  vector-effect: non-scaling-stroke;
}

.bd-plat3--tiles .bd-plat3__mod-body {
  min-width: 0;
  flex: 1 1 auto;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: var(--bd-space-4, 16px);
  border-left: 1px solid var(--bd-plat3-rule, #d5d7da);
}

.bd-plat3--tiles .bd-plat3__mod-title {
  margin: 0 0 var(--bd-space-2, 8px);
}

.bd-plat3--tiles .bd-plat3__mod-copy {
  padding-left: 0;
}

.bd-plat3--tiles .bd-plat3__feat {
  align-items: stretch;
  padding: var(--bd-space-6, 24px);
  background: var(--bd-surface, #fff);
  border: 1px dashed var(--bd-plat3-tile, #d5d7da);
  border-radius: var(--bd-v3-frame-in-radius, 8px);
  transition:
    border-color var(--bd-dur, 0.3s) var(--bd-ease, ease),
    background-color var(--bd-dur, 0.3s) var(--bd-ease, ease);
}

/* Big icon: the box stretches to the exact height of the text block
   across from it (stretch needs an auto cross size; the definite 80px
   width keeps the SVG square via its intrinsic ratio). The 1px Lucide
   stroke is kept by non-scaling-stroke on the shapes. */
.bd-plat3--tiles .bd-plat3__feat-icon {
  width: 80px;
  height: auto;
  align-self: stretch;
  color: var(--bd-plat3-tile-strong, var(--bd-text, #000));
}

/* Blue — On-premises. */
.bd-plat3--tiles .bd-plat3__feat:nth-child(1) {
  --bd-plat3-tile: rgba(37, 99, 235, 0.35);
  --bd-plat3-tile-strong: var(--bd-link, #2563eb);
  --bd-plat3-tile-soft: rgba(37, 99, 235, 0.05);
}

/* Green — Hosted. */
.bd-plat3--tiles .bd-plat3__feat:nth-child(2) {
  --bd-plat3-tile: rgba(18, 183, 106, 0.35);
  --bd-plat3-tile-strong: #12b76a;
  --bd-plat3-tile-soft: rgba(18, 183, 106, 0.05);
}

/* Purple — Hybrid. */
.bd-plat3--tiles .bd-plat3__feat:nth-child(3) {
  --bd-plat3-tile: rgba(100, 52, 216, 0.35);
  --bd-plat3-tile-strong: var(--bd-accent, #6434d8);
  --bd-plat3-tile-soft: rgba(100, 52, 216, 0.05);
}

.bd-plat3--tiles .bd-plat3__feat:hover {
  border-style: solid;
  border-color: var(--bd-plat3-tile-strong);
  background: var(--bd-plat3-tile-soft);
}

@media (max-width: 1023px) {
  .bd-plat3 {
    padding: 48px 0;
  }

  .bd-plat3__title {
    font-size: 28px;
  }

  .bd-plat3--tiles .bd-plat3__mod-icon-slot {
    flex-basis: 40px;
    width: 40px;
  }
}

@media (max-width: 767px) {
  .bd-plat3 .bd-wrap {
    scroll-margin-top: 80px;
  }

  .bd-plat3__intro {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--bd-space-4, 16px);
  }

  .bd-plat3__title {
    font-size: 24px;
  }

  .bd-plat3__col-label {
    font-size: var(--bd-text-sm, 14px);
    letter-spacing: 0.08em;
  }

  .bd-plat3__col-note {
    margin: var(--bd-space-3, 12px) 0 var(--bd-space-6, 24px);
  }

  .bd-plat3__panel {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .bd-plat3__col:first-child {
    padding-right: 0;
  }

  /* Hairline turns horizontal between the stacked groups. */
  .bd-plat3__col--deploy {
    padding-left: 0;
    padding-top: var(--bd-space-8, 32px);
    border-left: 0;
    border-top: 1px solid var(--bd-plat3-rule, #d5d7da);
  }

  /* Variant C: no hairline when stacked; the tiles separate. */
  .bd-plat3--tiles .bd-plat3__panel {
    grid-template-columns: 1fr;
    row-gap: var(--bd-space-8, 32px);
  }

  .bd-plat3--tiles .bd-plat3__col--deploy {
    padding-top: 0;
    border-top: 0;
  }

  /* Variant C: the padding lives on the deck, not the panel. */
  .bd-plat3--tiles .bd-plat3__deck {
    padding: var(--bd-space-6, 24px);
  }
}
