/* ==========================================================================
   Section patterns (see bi-sections.php): hero + engine card, practice cards,
   left-aligned section headers, numbered process steps, inner-page hero.
   Loaded after bi-design.css.
   ========================================================================== */

/* ----- Hero ----- */
.bm-hero { min-height: 0; align-items: stretch; }
.bm-hero .container { padding-top: clamp(48px, 6vw, 88px); padding-bottom: clamp(48px, 6vw, 88px); }
.bm-hero .hero-bg { width: 62%; opacity: .55; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 60%); mask-image: linear-gradient(90deg, transparent 0, #000 60%); }
.bm-hero__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.bm-hero .hero-content { max-width: 640px; }
.bm-hero h1 { font-size: clamp(2.5rem, 5.2vw, 4.25rem); }

.bm-engine {
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px 24px 20px;
}
.bm-engine__head { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 600; letter-spacing: .16em; color: var(--text-3); }
.bm-engine__dots { display: inline-flex; gap: 5px; }
.bm-engine__dots b { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
.bm-engine__dots b:first-child { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow-soft); }
.bm-engine__cols { display: flex; justify-content: space-between; margin-top: 22px; padding-bottom: 10px; border-bottom: 1px solid var(--line-2); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.bm-engine__list { list-style: none; margin: 0; padding: 0; }
.bm-engine__list li { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.bm-engine__k { font-weight: 600; color: var(--text); display: inline-flex; align-items: center; gap: 12px; }
.bm-engine__k::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow-soft); flex: none; }
.bm-engine__v { color: var(--text-2); text-align: right; font-size: 14px; }
.bm-engine__foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.bm-engine__foot span { font-size: 12px; font-weight: 500; color: var(--text-2); padding: 6px 12px; border-radius: 999px; background: var(--accent-tint); border: 1px solid var(--accent-glow-soft); }

.bm-hero__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: clamp(32px, 4vw, 56px); max-width: 760px; }
.bm-stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); padding: 18px 22px; }
.bm-stat strong { display: block; font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; color: var(--accent-text); }
.bm-stat span { display: block; margin-top: 6px; font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }

@media (max-width: 1023px) {
  .bm-hero__grid { grid-template-columns: 1fr; }
  .bm-hero .hero-bg { width: 100%; opacity: .22; }
}
@media (max-width: 639px) {
  .bm-hero__stats { grid-template-columns: 1fr; }
  .bm-stat { display: flex; align-items: baseline; gap: 14px; padding: 14px 18px; }
  .bm-stat span { margin-top: 0; }
  .bm-engine__list li { flex-direction: column; gap: 2px; }
  .bm-engine__v { text-align: left; padding-left: 19px; }
}

/* ----- Section headers: left-aligned like Basic Insight ----- */
@media (min-width: 768px) {
  .text-center:has(> .section-title) { text-align: left; }
  .text-center:has(> .section-title) .section-label { justify-content: flex-start; }
  .text-center:has(> .section-title) .section-desc { margin-left: 0; margin-right: 0; max-width: 40rem; }
}

/* ----- Practice cards ----- */
.bm-practices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.bm-practice {
  position: relative; display: flex; flex-direction: column; overflow: hidden; isolation: isolate;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 28px 24px; min-height: 280px; color: inherit;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.bm-practice:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.bm-practice__ghost {
  position: absolute; right: -6px; bottom: -34px; z-index: -1; pointer-events: none; user-select: none;
  font-size: clamp(120px, 14vw, 190px); font-weight: 800; letter-spacing: -.06em; line-height: 1;
  color: var(--text); opacity: .045;
}
:root[data-theme="dark"] .bm-practice__ghost { opacity: .06; }
.bm-practice__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.bm-practice__icon { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-xs); background: var(--accent-tint); color: var(--accent-text); border: 1px solid var(--accent-glow-soft); }
.bm-practice__count { font-size: 12px; font-weight: 500; letter-spacing: .08em; color: var(--text-3); }
.bm-practice h3 { font-size: clamp(1.25rem, 1.8vw, 1.5rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.2; color: var(--text); margin: 0 0 10px; }
.bm-practice p { color: var(--text-2); font-size: 15px; line-height: 1.65; max-width: 34rem; margin: 0; }
.bm-practice__foot { margin-top: auto; padding-top: 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.bm-practice__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.bm-chip { font-size: 12px; font-weight: 500; text-transform: capitalize; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text-2); }
.bm-practice__go { flex: none; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); transition: background .2s ease, color .2s ease, transform .2s ease; }
.bm-practice:hover .bm-practice__go { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); transform: translateX(2px); }
@media (max-width: 767px) {
  .bm-practices { grid-template-columns: 1fr; }
  .bm-practice { min-height: 0; padding: 24px 22px 20px; }
}

/* ----- Process steps → numbered columns ----- */
.process-step { background: none; border: 0; border-top: 2px solid var(--line-2); border-radius: 0; padding: 18px 0 0; }
.process-step .step-num { font-size: 13px; font-weight: 600; letter-spacing: .14em; color: var(--accent-text); }
.process-step h3 { font-size: 1.0625rem; font-weight: 600; margin: 10px 0 8px; }
.process-step p { font-size: 14px; }

/* ----- Inner page hero: grid + glow like the home stage ----- */
.page-hero { position: relative; overflow: hidden; padding: clamp(56px, 7vw, 104px) 0 clamp(48px, 6vw, 88px); }
.page-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 100% at 20% 0%, #000 20%, transparent 80%); mask-image: radial-gradient(ellipse 70% 100% at 20% 0%, #000 20%, transparent 80%);
}
.page-hero .container { position: relative; }
.page-hero .section-title, .page-hero .section-desc, .page-hero .section-label { margin-left: 0; margin-right: 0; }

.bm-engine__k { white-space: nowrap; flex: none; }
.bm-engine__v { min-width: 0; }

/* Align inner-page hero text with the page grid (container had an inline 768px cap) */
.page-hero .container, .page-hero .container[style*="max-width"] { max-width: var(--container) !important; }
.page-hero .container > * { max-width: 52rem; }
.page-hero .container > .case-detail-meta { max-width: none; }
