/* ==========================================================================
   Content pages: service pages (/services/<slug>), case studies (/case-studies/<slug>),
   Insights (/insights, /insights/<slug>) and the legal pages. One shared vocabulary:
   .pg-hero, .pg-section, .pg-grid/.pg-card, .pg-steps, .pg-split, .pg-tags, .pg-faq,
   .pg-cta, .pg-related, .prose, .pg-note, .pg-figure, .pg-meta.
   ========================================================================== */

/* ---------- Hero ---------- */
.pg-hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(56px, 8vw, 110px) 0 clamp(48px, 6vw, 80px);
  border-bottom: 1px solid var(--line);
}
.pg-hero::before {
  content: ""; position: absolute; z-index: -1; inset: -40% -10% auto auto; width: 70%; height: 140%;
  background: radial-gradient(closest-side, rgba(53, 103, 219, .28), rgba(66, 52, 219, .08) 55%, transparent 75%);
  pointer-events: none;
}
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 0 0 28px; padding: 0; list-style: none; font-size: 14px; color: #a7b1bf; }
.crumbs li + li::before { content: "/"; margin-right: 10px; color: #5c6675; }
.crumbs a { color: #c9d3e1; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs [aria-current] { color: #8fb0f0; }
.pg-eyebrow { display: block; margin-bottom: 16px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #8fb0f0; }
.pg-title { max-width: 900px; font-size: clamp(36px, 5.2vw, 68px); line-height: 1.06; letter-spacing: -.01em; color: #fff; }
.pg-lead { max-width: 720px; margin-top: 22px; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; color: #c7cfdc; }
.pg-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.pg-actions .btn-solid, .pg-actions .btn-outline { min-height: 48px; }
.pg-badge {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 500;
  color: #dbe5f7; background: rgba(53, 103, 219, .16); border: 1px solid rgba(91, 135, 227, .45);
}

/* ---------- Sections ---------- */
.pg-section { padding: clamp(56px, 7vw, 100px) 0; }
.pg-section + .pg-section { border-top: 1px solid rgba(255, 255, 255, .06); }
.pg-section--alt { background: var(--bg-2); }
.pg-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.pg-h2 { font-size: clamp(28px, 3.2vw, 44px); line-height: 1.15; color: #fff; }
.pg-intro { margin-top: 16px; font-size: 17px; line-height: 1.6; color: #b8c2d0; }

/* Card grid */
.pg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 18px; }
.pg-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.pg-card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 26px; border-radius: 18px;
  background: var(--card); border: 1px solid var(--line);
}
.pg-card h3 { font-size: 20px; font-weight: 500; line-height: 1.3; color: #fff; }
.pg-card p { font-size: 15.5px; line-height: 1.6; color: #b8c2d0; }
a.pg-card { transition: border-color .25s var(--ease), transform .25s var(--ease); }
a.pg-card:hover { border-color: rgba(91, 135, 227, .7); transform: translateY(-2px); }
.pg-card__more { margin-top: auto; padding-top: 6px; font-size: 15px; color: #8fb0f0; }
.pg-list { display: flex; flex-direction: column; gap: 8px; }
.pg-list li { position: relative; padding-left: 22px; font-size: 15.5px; line-height: 1.55; color: #c7cfdc; }
.pg-list li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 2px; background: var(--accent-grad); }

/* Numbered process */
.pg-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 18px; counter-reset: step; }
.pg-steps > li {
  counter-increment: step; position: relative;
  padding: 26px 24px 24px; border-radius: 18px; background: var(--card); border: 1px solid var(--line);
}
.pg-steps > li::before {
  content: counter(step, decimal-leading-zero); display: block; margin-bottom: 14px;
  font-size: 14px; font-weight: 600; letter-spacing: .06em; color: #8fb0f0;
}
.pg-steps h3 { margin-bottom: 8px; font-size: 19px; font-weight: 500; color: #fff; }
.pg-steps p { font-size: 15px; line-height: 1.6; color: #b8c2d0; }

/* Two columns: copy + aside */
.pg-split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.pg-aside { padding: 26px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.pg-aside h3 { margin-bottom: 14px; font-size: 18px; font-weight: 500; color: #fff; }
.pg-aside dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0; font-size: 15px; }
.pg-aside dt { color: #a7b1bf; }
.pg-aside dd { margin: 0; color: #fff; }
.pg-aside a { color: #8fb0f0; text-decoration: underline; }

/* Stack chips */
.pg-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.pg-tags li { padding: 8px 14px; border-radius: 999px; font-size: 14.5px; color: #dbe5f7; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }

/* Figures */
.pg-figure { margin: 0; }
.pg-figure img { width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--line); }
.pg-figure figcaption { margin-top: 10px; font-size: 14px; color: #a7b1bf; }

/* Callout */
.pg-note {
  padding: 18px 22px; border-radius: 14px; font-size: 15.5px; line-height: 1.6; color: #dbe5f7;
  background: rgba(53, 103, 219, .1); border: 1px solid rgba(91, 135, 227, .4);
}
.pg-note a { color: #8fb0f0; text-decoration: underline; }

/* FAQ: answers are always in the HTML; <details> only folds them visually. */
.pg-faq { display: flex; flex-direction: column; gap: 12px; max-width: 900px; }
.pg-faq details { border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.pg-faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 56px; padding: 16px 22px; cursor: pointer; list-style: none;
  font-size: 17px; font-weight: 500; color: #fff;
}
.pg-faq summary::-webkit-details-marker { display: none; }
.pg-faq summary::after { content: "+"; flex: 0 0 auto; font-size: 22px; line-height: 1; color: #8fb0f0; transition: transform .25s var(--ease); }
.pg-faq details[open] summary::after { transform: rotate(45deg); }
.pg-faq__a { padding: 0 22px 20px; font-size: 15.5px; line-height: 1.65; color: #c7cfdc; }
.pg-faq__a a { color: #8fb0f0; text-decoration: underline; }

/* Related links */
.pg-related { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; }

/* CTA band */
.pg-cta {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(36px, 5vw, 64px); border-radius: 24px; text-align: center;
  background: linear-gradient(135deg, rgba(53, 103, 219, .28), rgba(66, 52, 219, .12)), var(--card);
  border: 1px solid rgba(91, 135, 227, .35);
}
.pg-cta h2 { font-size: clamp(26px, 3vw, 40px); line-height: 1.15; color: #fff; }
.pg-cta p { max-width: 620px; margin: 14px auto 0; font-size: 17px; line-height: 1.6; color: #c7cfdc; }
.pg-cta .pg-actions { justify-content: center; }

/* ---------- Long-form text (articles, legal) ---------- */
.prose { max-width: 760px; font-size: 17px; line-height: 1.75; color: #c7cfdc; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2.2em; font-size: clamp(24px, 2.4vw, 32px); line-height: 1.2; color: #fff; }
.prose h3 { margin-top: 1.8em; font-size: 20px; font-weight: 500; color: #fff; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose a { color: #8fb0f0; text-decoration: underline; }
.prose strong { color: #fff; font-weight: 600; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.prose th, .prose td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th { color: #fff; font-weight: 500; }
.pg-table-wrap { overflow-x: auto; }
.pg-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 22px; font-size: 14.5px; color: #a7b1bf; }

/* Spacing between stacked blocks inside one section */
.pg-grid + .pg-note, .pg-steps + .pg-note, .pg-split + .pg-note, .pg-grid + .pg-tags, .pg-split + .pg-grid, .pg-grid + .pg-grid { margin-top: 24px; }

@media (max-width: 991px) {
  .pg-split { grid-template-columns: 1fr; }
}
@media (max-width: 599px) {
  .pg-actions > a, .pg-actions > button { flex: 1 1 100%; justify-content: center; }
  .pg-card, .pg-steps > li, .pg-aside { padding: 22px 20px; }
}

/* ==========================================================================
   LIGHT THEME (only when <html class="theme-light">)
   ========================================================================== */
.theme-light .pg-hero { border-color: var(--line); }
.theme-light .pg-title, .theme-light .pg-h2, .theme-light .pg-card h3, .theme-light .pg-steps h3,
.theme-light .pg-aside h3, .theme-light .pg-aside dd, .theme-light .pg-faq summary, .theme-light .pg-cta h2,
.theme-light .prose h2, .theme-light .prose h3, .theme-light .prose strong, .theme-light .prose th { color: var(--text); }
.theme-light .pg-lead, .theme-light .pg-intro, .theme-light .pg-card p, .theme-light .pg-list li, .theme-light .pg-steps p,
.theme-light .pg-faq__a, .theme-light .pg-cta p, .theme-light .prose, .theme-light .pg-note { color: var(--text-2); }
.theme-light .crumbs ol, .theme-light .pg-meta, .theme-light .pg-aside dt, .theme-light .pg-figure figcaption { color: var(--muted); }
.theme-light .crumbs a { color: var(--text); }
.theme-light .pg-eyebrow, .theme-light .crumbs [aria-current], .theme-light .pg-card__more, .theme-light .pg-steps > li::before,
.theme-light .pg-faq summary::after, .theme-light .prose a, .theme-light .pg-faq__a a, .theme-light .pg-aside a, .theme-light .pg-note a { color: var(--accent); }
.theme-light .pg-card, .theme-light .pg-steps > li, .theme-light .pg-aside, .theme-light .pg-faq details { background: #fff; border-color: var(--line); }
.theme-light .pg-section--alt { background: #f4f7fc; }
.theme-light .pg-tags li { color: var(--text); background: #fff; }
.theme-light .pg-badge { color: var(--text); }
.theme-light .pg-cta { background: linear-gradient(135deg, rgba(53, 103, 219, .14), rgba(66, 52, 219, .05)), #fff; }
