/* =========================================================================
   feature-split / style-features-splits — SELF-SCOPED block styles.

   WHY THIS FILE EXISTS
   The page-scoped `.nx-page-features .split-*` rules in template.css only match
   the Features page wrapper. The SAME block also runs on Solutions
   (`.nx-page-solutions`) and any other page, where NONE of those rules apply —
   so `.split-row` lost its grid, `.split-panel` lost its size/surface and
   collapsed, and the icon leaked inline between rows (orphan glyphs).

   Fix: scope every layout/visual rule to the block's OWN root class
   `.acm-feature-split` (auto-loaded by mod_ja_acm on every render). Now every
   row renders a proper media panel beside the copy, alternating by `.is-reverse`,
   at any row count, on any page, in light + dark.

   Specificity is kept low ((0,2,0)/(0,2,1)) so the Features page's exact-px
   `.nx-page-features .split-*` rules (0,2,1)+ still win there — this file is the
   universal baseline everywhere else without regressing Features parity.
   Tokens are theme-aware (darkmode.css flips them), so both modes are covered.
   ========================================================================= */

/* ---- band + row grid ------------------------------------------------------ */
.acm-feature-split.sec-splits .container {
  display: flex;
  flex-direction: column;
  gap: 88px;
}

.acm-feature-split .split-row {
  display: grid;
  grid-template-columns: 440px 1fr;
  gap: 72px;
  align-items: center;
}

/* Reverse rows put the panel first (media on the left, copy on the right). */
.acm-feature-split .split-row.is-reverse .split-panel { order: -1; }

/* ---- copy column ---------------------------------------------------------- */
.acm-feature-split .split-copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
  min-width: 0; /* let the 1fr copy column shrink instead of overflowing */
}

.acm-feature-split .split-copy .eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--color-primary);
  margin: 0;
}
.acm-feature-split .split-copy .eyebrow-build   { color: var(--color-secondary); }
.acm-feature-split .split-copy .eyebrow-operate { color: var(--color-accent-3); }

.acm-feature-split .split-title {
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.8px;
  line-height: 1.12;
  color: var(--color-heading);
  margin: 0;
}

.acm-feature-split .split-desc {
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-muted);
  margin: 0;
}

.acm-feature-split .split-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.acm-feature-split .split-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-muted);
  font-size: 15px;
}
.acm-feature-split .split-list .tick {
  display: inline-flex;
  align-items: center;
  color: var(--color-accent-3);
  flex: 0 0 auto;
}
.acm-feature-split .split-list .tick .lucide { width: 17px; height: 17px; }

.acm-feature-split .split-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
}
.acm-feature-split .split-link .lucide {
  width: 15px;
  height: 15px;
  transition: transform var(--dur, .2s) var(--ease, ease);
}
.acm-feature-split .split-link:hover { color: var(--color-primary-hover); }
.acm-feature-split .split-link:hover .lucide { transform: translateX(3px); }

/* ---- media panel (the "visual") ------------------------------------------ */
/* Always has intrinsic size + surface + border + radius so it reads as a
   product-mock panel — never collapses to a bare inline icon. */
.acm-feature-split .split-panel {
  position: relative;
  overflow: clip;
  min-height: 320px;
  border-radius: 16px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  display: grid;
  place-items: center;
}

/* Default accent glow (blue) — applies even when no row-panel-class is set
   (e.g. Solutions rows ship an empty panel class). */
.acm-feature-split .split-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(90% 90% at 50% 40%,
    rgb(var(--color-primary-rgb) / 0.30), transparent 70%);
  pointer-events: none;
}

/* Named panel tones (Features supplies these; kept theme-aware). */
.acm-feature-split .split-panel-build::before {
  background: radial-gradient(90% 90% at 50% 40%,
    rgb(var(--color-secondary-rgb) / 0.34), transparent 70%);
}
.acm-feature-split .split-panel-operate::before {
  background: radial-gradient(90% 90% at 50% 40%,
    rgb(var(--color-accent-3-rgb) / 0.34), transparent 70%);
}

/* Fallback tone alternation when rows carry no panel class: give even rows the
   emerald glow so consecutive panels read as distinct (matches the .pen rhythm
   of alternating build/operate accents). */
.acm-feature-split .split-row:nth-child(even) .split-panel:not([class*="split-panel-"])::before {
  background: radial-gradient(90% 90% at 50% 40%,
    rgb(var(--color-accent-3-rgb) / 0.30), transparent 70%);
}

/* Centered icon tile — a nested card-2 surface, so the panel looks intentional
   rather than empty. Sits above the glow. */
.acm-feature-split .split-badge {
  position: relative;
  z-index: 1;
  width: 84px;
  height: 84px;
  border-radius: 20px;
  background: var(--color-card-2);
  border: 1px solid var(--color-border);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-lg, 0 16px 40px rgb(0 0 0 / 0.4));
}
.acm-feature-split .split-badge .lucide {
  width: 38px;
  height: 38px;
  color: var(--color-primary);
}
.acm-feature-split .split-panel-build   .split-badge .lucide { color: var(--color-secondary); }
.acm-feature-split .split-panel-operate .split-badge .lucide { color: var(--color-accent-3); }
.acm-feature-split .split-row:nth-child(even) .split-panel:not([class*="split-panel-"]) .split-badge .lucide {
  color: var(--color-accent-3);
}

/* Optional swappable media: when a row-image is supplied it fills the panel and
   the icon tile is not rendered. */
.acm-feature-split .split-panel .split-media {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

/* ---- responsive: stack copy then panel below ~900px ---------------------- */
@media (max-width: 900px) {
  .acm-feature-split.sec-splits .container { gap: 40px; }
  .acm-feature-split .split-row {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  /* Always render copy first, panel second on stack (ignore reverse DOM order:
     on reverse rows the panel is DOM-first, so pin explicit orders). */
  .acm-feature-split .split-row .split-copy  { order: 0; }
  .acm-feature-split .split-row .split-panel { order: 1; }
  .acm-feature-split .split-row.is-reverse .split-panel { order: 1; }
  .acm-feature-split .split-title { font-size: 26px; }
  .acm-feature-split .split-panel { min-height: 220px; }
  .acm-feature-split .split-badge { width: 68px; height: 68px; border-radius: 16px; }
  .acm-feature-split .split-badge .lucide { width: 32px; height: 32px; }
}
