/* =========================================================================
   Marketing page content — the shared bwe-* vocabulary that pages pass into
   MarketingPage as ChildContent. Page markup carries no CSS-isolation scope,
   so these rules must be global. Loaded after the scoped bundle so they win
   ties with legacy component styles. Tokens: css/bhogi-ds.css.
   ========================================================================= */

.mp-content { font-size: 17px; line-height: 1.65; color: var(--bc-text-muted); }

/* ---------- typography rhythm ---------- */
.mp-content h2 {
    margin: 0 0 16px;
    font-family: var(--bc-font-display);
    font-size: clamp(1.75rem, 1.3rem + 1.5vw, 2.5rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.028em;
    color: var(--bc-ink-900);
    text-wrap: balance;
    max-width: 820px;
}

/* Section blocks and top-level h2s start a new section */
.mp-content > section:not(.bwe-split),
.mp-content > .industry-playbook { margin-top: clamp(72px, 7vw, 112px); }
.mp-content > section:first-child,
.mp-content > .industry-playbook:first-child { margin-top: 0; }
/* A top-level h2 starts a new section */
.mp-content > h2 { margin-top: clamp(72px, 7vw, 112px); }
.mp-content > h2:first-child,
.mp-content > .service-visual + h2,
.mp-content > figure:first-child + h2 { margin-top: 0; }

.mp-content h3 {
    margin: 0 0 8px;
    font-family: var(--bc-font-display);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.015em;
    color: var(--bc-ink-900);
}

.mp-content > p,
.mp-content section > p,
.mp-content .bwe-split > div > p { max-width: 720px; margin: 0 0 16px; text-wrap: pretty; }

.mp-content > ul:not([class]),
.mp-content > ol:not([class]) { max-width: 720px; padding-left: 1.25em; margin: 0 0 16px; }
.mp-content > ul:not([class]) li,
.mp-content > ol:not([class]) li { margin: 6px 0; }
.mp-content > ul:not([class]) li::marker { color: var(--bc-green-600); }

.mp-content a:not([class]) {
    color: var(--bc-green-700);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: rgba(23, 107, 77, 0.3);
    text-underline-offset: 3px;
    transition: text-decoration-color var(--bc-dur) var(--bc-ease);
}
.mp-content a:not([class]):hover { text-decoration-color: currentColor; }

.mp-content strong { color: var(--bc-ink-900); font-weight: 600; }

.mp-content table {
    width: 100%;
    margin: 24px 0 8px;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--bc-gray-200);
    border-radius: 16px;
    overflow: hidden;
    font-size: 15px;
}
.mp-content th,
.mp-content td { padding: 14px 18px; text-align: left; border-top: 1px solid var(--bc-gray-100); vertical-align: top; }
.mp-content thead th {
    border-top: 0;
    background: var(--bc-gray-50);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bc-gray-500);
}
.mp-content td:first-child { color: var(--bc-ink-900); font-weight: 600; }

/* Legacy reveal helpers are now static; the global bhogi-reveal.js handles motion. */
.mp-content .reveal-up,
.mp-content .reveal-fade { opacity: 1; transform: none; }

/* ---------- service illustration ---------- */
.mp-content .service-visual {
    max-width: none;
    margin: 0 0 clamp(64px, 6vw, 96px);
    padding: clamp(20px, 3vw, 40px);
    border-radius: 24px;
    background:
        radial-gradient(80% 90% at 100% 0%, rgba(53, 166, 111, 0.1), transparent 60%),
        var(--bc-gray-50);
    border: 1px solid var(--bc-gray-200);
}
.mp-content .service-visual img {
    max-width: 960px;
    margin: 0 auto;
    border: 1px solid var(--bc-gray-200);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(8, 17, 15, 0.04), 0 12px 24px -8px rgba(8, 17, 15, 0.1), 0 40px 80px -32px rgba(8, 17, 15, 0.22);
}
.mp-content .service-visual figcaption {
    max-width: 960px;
    margin: 16px auto 0;
    font-size: 14px;
    color: var(--bc-gray-500);
    text-align: center;
}
.mp-content .service-visual figcaption span { color: var(--bc-gray-400); }

/* ---------- feature grid ---------- */
.mp-content .bwe-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin: 36px 0 0;
}
/* Pick a column count that leaves no orphans: 4 for 4/8 cards, 2 for 2 cards. */
.mp-content .bwe-feature-grid:has(> :last-child:nth-child(4n)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mp-content .bwe-feature-grid:has(> :last-child:nth-child(2)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1024px) {
    .mp-content .bwe-feature-grid,
    .mp-content .bwe-feature-grid:has(> :last-child:nth-child(4n)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.mp-content .bwe-feature-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 28px 26px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--bc-gray-200);
    box-shadow: var(--bc-shadow-xs);
    transition: transform var(--bc-dur) var(--bc-ease), box-shadow var(--bc-dur) var(--bc-ease), border-color var(--bc-dur) var(--bc-ease);
}
.mp-content .bwe-feature-card:hover {
    transform: translateY(-3px);
    border-color: var(--bc-green-200);
    box-shadow: var(--bc-shadow-md);
}

.mp-content .bwe-feature-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 20px;
    border-radius: 50%;
    background: var(--bc-mint);
    color: var(--bc-emerald);
}
.mp-content .bwe-feature-icon svg,
.mp-content .bwe-feature-icon .lucide { width: 20px; height: 20px; stroke-width: 1.75; }

.mp-content .bwe-feature-card p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--bc-text-muted);
}

.mp-content .bwe-feature-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 18px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--bc-green-700);
    text-decoration: none;
}
.mp-content .bwe-feature-link::after {
    content: "→";
    transition: transform var(--bc-dur) var(--bc-ease);
}
.mp-content .bwe-feature-link:hover::after { transform: translateX(3px); }
/* Some cards already include an arrow span in their markup. */
.mp-content .bwe-feature-link:has(> span)::after { content: none; }
.mp-content .bwe-feature-link > span { transition: transform var(--bc-dur) var(--bc-ease); }
.mp-content .bwe-feature-link:hover > span { transform: translateX(3px); }

/* ---------- split sections ---------- */
.mp-content .bwe-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(32px, 5vw, 72px);
    align-items: center;
    margin: clamp(72px, 7vw, 112px) 0 0;
}
.mp-content .bwe-split h2 { margin-top: 0; }

.mp-content .bwe-checklist {
    list-style: none;
    margin: 24px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.mp-content .bwe-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    font-size: 16px;
    line-height: 1.5;
    color: var(--bc-gray-700);
}
.mp-content .bwe-checklist li > span:first-child,
.mp-content .bwe-checklist li > .lucide {
    flex: none;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin-top: -4px;
    border-radius: 9px;
    background: var(--bc-green-50);
    color: var(--bc-green-700);
    box-shadow: inset 0 0 0 1px var(--bc-green-100);
}
.mp-content .bwe-checklist svg { width: 17px; height: 17px; }

/* dark "snapshot" panel */
.mp-content .bwe-mini-panel {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: clamp(28px, 3vw, 40px);
    border-radius: 24px;
    background: var(--bc-emerald-dark);
    color: var(--bc-on-dark-muted);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 32px 64px -32px rgba(8, 17, 15, 0.55);
}
.mp-content .bwe-mini-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(70% 90% at 100% 0%, rgba(53, 166, 111, 0.4), transparent 60%),
        radial-gradient(50% 60% at 0% 100%, rgba(200, 164, 93, 0.1), transparent 70%);
}
.mp-content .bwe-mini-panel h3 { margin: 0 0 8px; font-size: 20px; color: #fff; }
.mp-content .bwe-mini-panel p { margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--bc-on-dark-muted); max-width: none; }

.mp-content .bwe-mini-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
    margin-top: 24px;
}
.mp-content .bwe-mini-stats > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.mp-content .bwe-mini-stats strong {
    font-family: var(--bc-font-display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: #fff;
}
.mp-content .bwe-mini-stats span {
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--bc-on-dark-subtle);
}

/* legacy buttons inside page content */
.mp-content .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 20px;
    border-radius: var(--bc-radius-md);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background-color var(--bc-dur) var(--bc-ease), border-color var(--bc-dur) var(--bc-ease);
}
.mp-content .btn-primary { background: var(--bc-primary); color: #fff; }
.mp-content .btn-primary:hover { background: var(--bc-primary-hover); }
.mp-content .btn-secondary { background: #fff; color: var(--bc-ink-900); border-color: var(--bc-border-strong); }
.mp-content .btn-secondary:hover { border-color: var(--bc-gray-400); }

@media (max-width: 900px) {
    .mp-content .bwe-split { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .mp-content { font-size: 16px; }
    .mp-content .bwe-feature-grid { grid-template-columns: 1fr; }
    .mp-content table { display: block; overflow-x: auto; }
}

/* =========================================================================
   Global page primitives for bespoke pages (pages that do not use MarketingPage).
   Markup:
   <div class="bc-page">
     <header class="bc-hero">
       <div class="bc-hero__bg" aria-hidden="true"><div class="bc-hero__grid"></div><div class="bc-hero__glow"></div></div>
       <div class="bc-container">
         <p class="bc-hero__eyebrow">Section</p>
         <h1 class="bc-hero__title">Title</h1>
         <p class="bc-hero__sub">Subtitle</p>
         <div class="bc-hero__actions"><a class="bc-btn bc-btn--primary bc-btn--lg">...</a><a class="bc-btn bc-btn--ghost-dark bc-btn--lg">...</a></div>
       </div>
     </header>
     <section class="bc-section">...</section>
     <section class="bc-cta"><div class="bc-container"><div class="bc-cta__card">...</div></div></section>
   </div>
   ========================================================================= */

.bc-page {
    position: relative;
    background: #fff;
    color: var(--bc-text);
    overflow-x: clip;
    margin-top: calc(-1 * var(--bc-header-h, 72px));
}

.bc-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: var(--bc-emerald-dark);
    color: var(--bc-on-dark);
    padding: calc(var(--bc-header-h, 72px) + clamp(56px, 6vw, 96px)) 0 clamp(64px, 7vw, 104px);
}
.bc-hero--center { text-align: center; }
.bc-hero--center .bc-hero__title,
.bc-hero--center .bc-hero__sub { margin-left: auto; margin-right: auto; }
.bc-hero--center .bc-hero__actions,
.bc-hero--center .bc-hero__assure { justify-content: center; }

.bc-hero__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.bc-hero__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 70% 80% at 30% 30%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 70% 80% at 30% 30%, #000 30%, transparent 75%);
}
.bc-hero__glow {
    position: absolute;
    width: 820px;
    height: 560px;
    right: -160px;
    bottom: -280px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(53, 166, 111, 0.5), transparent 70%);
    filter: blur(60px);
}

.bc-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bc-green-300);
}
.bc-hero__eyebrow::before { content: ""; width: 24px; height: 1px; background: currentColor; opacity: 0.6; }

.bc-hero__title {
    max-width: 880px;
    margin: 0;
    font-family: var(--bc-font-display);
    font-size: clamp(2.375rem, 1.5rem + 3.2vw, 4rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.035em;
    color: #fff;
    text-wrap: balance;
}
.bc-hero__title em,
.bc-hero__title .bc-accent {
    font-style: normal;
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    color: var(--bc-gold);
}

.bc-hero__sub {
    max-width: 680px;
    margin: 24px 0 0;
    font-size: clamp(1.0625rem, 0.98rem + 0.35vw, 1.25rem);
    line-height: 1.6;
    color: var(--bc-on-dark-muted);
    text-wrap: pretty;
}

.bc-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.bc-hero__assure {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
    font-size: 13.5px;
    color: var(--bc-on-dark-subtle);
}
.bc-hero__assure li { display: inline-flex; align-items: center; gap: 7px; }
.bc-hero__assure svg { color: var(--bc-green-400); width: 15px; height: 15px; }

/* grids */
.bc-grid { display: grid; gap: 20px; }
.bc-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bc-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bc-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1024px) { .bc-grid--3, .bc-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .bc-grid--2, .bc-grid--3, .bc-grid--4 { grid-template-columns: 1fr; } }

/* cards */
.bc-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 28px 26px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--bc-gray-200);
    box-shadow: var(--bc-shadow-xs);
    color: var(--bc-text-muted);
    text-decoration: none;
    transition: transform var(--bc-dur) var(--bc-ease), box-shadow var(--bc-dur) var(--bc-ease), border-color var(--bc-dur) var(--bc-ease);
}
a.bc-card:hover, .bc-card--hover:hover { transform: translateY(-3px); border-color: var(--bc-green-200); box-shadow: var(--bc-shadow-md); }
.bc-card h3, .bc-card__title {
    margin: 0 0 8px;
    font-family: var(--bc-font-display);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.015em;
    color: var(--bc-ink-900);
}
.bc-card p { margin: 0; font-size: 15px; line-height: 1.6; }
.bc-card--dark { background: var(--bc-emerald-dark); border-color: rgba(255, 255, 255, 0.08); color: var(--bc-on-dark-muted); }
.bc-card--dark h3, .bc-card--dark .bc-card__title { color: #fff; }

.bc-icon-chip {
    display: grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    margin-bottom: 20px;
    border-radius: 50%;
    background: var(--bc-mint);
    color: var(--bc-emerald);
}
.bc-icon-chip svg { width: 20px; height: 20px; }
.bc-icon-chip--soft { background: var(--bc-green-50); color: var(--bc-green-700); box-shadow: inset 0 0 0 1px var(--bc-green-100); }

.bc-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--bc-radius-pill);
    background: var(--bc-green-50);
    color: var(--bc-green-700);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.bc-prose { max-width: 760px; font-size: 17px; line-height: 1.7; color: var(--bc-text-muted); }
.bc-prose h2 { margin: 56px 0 14px; font-family: var(--bc-font-display); font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); letter-spacing: -0.025em; color: var(--bc-ink-900); }
.bc-prose h3 { margin: 32px 0 10px; font-size: 19px; color: var(--bc-ink-900); }
.bc-prose a { color: var(--bc-green-700); text-underline-offset: 3px; }

/* closing CTA — light green panel per the colour spec (same look as MarketingPage) */
.bc-cta { background: #fff; padding-bottom: clamp(72px, 7vw, 112px); }
.bc-section--alt + .bc-cta { background: var(--bc-surface-alt); }
.bc-cta__card {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: clamp(48px, 6vw, 88px) clamp(24px, 5vw, 72px);
    border-radius: 28px;
    background:
        radial-gradient(60% 80% at 50% 120%, rgba(53, 166, 111, 0.18), transparent 70%),
        radial-gradient(40% 50% at 90% -10%, rgba(200, 164, 93, 0.14), transparent 70%),
        var(--bc-mint);
    border: 1px solid #D3E8DC;
    color: var(--bc-heading);
    text-align: center;
}
.bc-cta__title {
    max-width: 760px;
    margin: 0 auto;
    font-family: var(--bc-font-display);
    font-size: clamp(2rem, 1.3rem + 2.4vw, 3.25rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--bc-heading);
    text-wrap: balance;
}
.bc-cta__body { max-width: 560px; margin: 18px auto 0; font-size: 17.5px; line-height: 1.6; color: var(--bc-body); }
.bc-cta__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
/* Pages built before the light CTA used ghost buttons in it; render those as secondary. */
.bc-cta__card .bc-btn--ghost-dark { --_bg: #fff; --_fg: var(--bc-heading); --_bd: var(--bc-border-strong); }
.bc-cta__card .bc-btn--ghost-dark:hover { --_bd: var(--bc-gray-400); }
.bc-cta__card .bc-eyebrow { color: var(--bc-emerald); }
.bc-cta__card p:not([class]) { color: var(--bc-body); }

/* Hero primary actions use Fresh Green on the dark emerald background. */
.bc-hero__actions .bc-btn--primary { --_bg: var(--bc-fresh); }
.bc-hero__actions .bc-btn--primary:hover { --_bg: #2E9462; }

/* Card hover background */
a.bc-card:hover, .bc-card--hover:hover, .mp-content .bwe-feature-card:hover { background: var(--bc-hover-bg); }

/* Decorative dark panels use Dark Emerald. */
.bc-card--dark,
.mp-content .bwe-mini-panel { background-color: var(--bc-emerald-dark); }

@media (max-width: 560px) {
    .bc-hero__actions .bc-btn, .bc-cta__actions .bc-btn { flex: 1 1 100%; }
}
