/* ============================================================================
   Commercial Engagements — page-specific components
   CSP-strict: external stylesheet only, no inline styles anywhere.
   Reuses the global design tokens from styles.css (--brand, --font-*, etc.).
   Adds ONLY the few patterns that do not already exist in the design system:
     1. integrated-solutions hover-reveal card grid            (Section 3)
     2. operating-model / increasing-involvement columns       (Section 11)
     3. check-list                                             (Section 13)
   ========================================================================== */

/* --- Sections 2 & 3: center the eyebrow+heading as one block, left-aligned inside,
   so the eyebrow sits directly above the first word of the heading (the heading
   reads visually centered as a fit-content block). */
.ce-introhead {
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* --- Section 3: "Our Integrated Commercial Solutions" — hover-reveal card grid.
   Modeled on the "At a Glance" (.solx-card) treatment: dark cards, magenta glow,
   reveal panel on :hover / :focus-within (keyboard + tap accessible). No images,
   smaller tiles, 3 / 2 / 1 columns. Reuses the design tokens from styles.css. */

.ce-sol-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  margin-top: 2.5rem;
}
.ce-sol-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: 1.9rem 1.7rem;
  background: linear-gradient(155deg, #322d52 0%, #272c4a 52%, #1f2338 100%);
  border: 1px solid rgba(201, 71, 225, 0.18);
  border-radius: 18px;
  cursor: pointer;
  overflow: hidden;
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease, opacity .28s ease;
}
/* top magenta accent bar */
.ce-sol-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), rgba(74, 123, 200, 0.6) 60%, rgba(201, 71, 225, 0) 100%);
  opacity: 0.7;
  transition: opacity .28s ease;
}
/* soft magenta corner glow for depth */
.ce-sol-card::after {
  content: "";
  position: absolute;
  right: -28%;
  bottom: -32%;
  width: 75%;
  height: 75%;
  background: radial-gradient(circle, rgba(201, 71, 225, 0.20), rgba(201, 71, 225, 0) 70%);
  pointer-events: none;
  transition: opacity .28s ease;
  opacity: 0.8;
}
.ce-sol-card:hover,
.ce-sol-card:focus-within {
  transform: translateY(-6px);
  z-index: 20;
  border-color: var(--brand);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.5), 0 0 34px rgba(201, 71, 225, 0.55);
  outline: none;
}
.ce-sol-card:hover::before,
.ce-sol-card:focus-within::before { opacity: 1; }
.ce-sol-card:hover::after,
.ce-sol-card:focus-within::after { opacity: 1; }
/* sub-brand label as a small magenta chip */
.ce-sol-card__brand {
  align-self: flex-start;
  color: #e7a8f3;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(201, 71, 225, 0.16);
  border: 1px solid rgba(201, 71, 225, 0.35);
  padding: 0.34em 0.8em;
  border-radius: 2em;
}
/* big number in the brand gradient (magenta -> blue) */
.ce-sol-card__num {
  font-family: var(--font-hero);
  font-size: 2.9rem;
  line-height: 1;
  margin-top: 0.6rem;
  background: linear-gradient(135deg, #d564ea 0%, #8a5bc4 50%, #4a7bc8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ce-sol-card__title {
  margin: 0.45rem 0 0;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.34rem;
  line-height: 1.22;
  color: #ffffff;
}
.ce-sol-card__headline {
  margin: 0.7rem 0 0;
  font-size: 1.06rem;
  font-weight: 600;
  line-height: 1.45;
  color: #cdc4e8;
}
/* keep resting text above the decorative corner glow */
.ce-sol-card__brand,
.ce-sol-card__num,
.ce-sol-card__title,
.ce-sol-card__headline {
  position: relative;
  z-index: 1;
}
/* Reveal panel — magenta-glowing, covers the card on hover/focus/tap */
.ce-sol-card__reveal {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 1.7rem 1.7rem;
  background: rgba(35, 37, 46, 0.72);
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0) 42%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(201, 71, 225, 0.45);
  border-radius: 18px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 20px 60px rgba(0, 0, 0, 0.45), 0 0 40px rgba(201, 71, 225, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  overflow-y: auto;
  transition: opacity .28s ease, transform .28s ease, visibility 0s linear .28s;
  z-index: 1;
}
.ce-sol-card:hover .ce-sol-card__reveal,
.ce-sol-card:focus-within .ce-sol-card__reveal {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity .28s ease, transform .28s ease, visibility 0s;
}
.ce-sol-card__reveal::-webkit-scrollbar { width: 6px; }
.ce-sol-card__reveal::-webkit-scrollbar-thumb { background: var(--brand); border-radius: 3px; }
.ce-sol-card__reveal-title {
  margin: 0 0 0.7rem;
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.14rem;
  line-height: 1.28;
}
.ce-sol-card__body {
  margin: 0;
  color: #ece9f1;
  font-weight: 500;
  font-size: 0.97rem;
  line-height: 1.6;
}
.ce-sol-card__reveal .solx-explore { margin-top: 1rem; }
/* Dim the non-active cards, like the At-a-Glance grid */
.ce-sol-grid:has(.ce-sol-card:hover) .ce-sol-card:not(:hover),
.ce-sol-grid:has(.ce-sol-card:focus-within) .ce-sol-card:not(:focus-within) {
  opacity: 0.5;
}
@media (max-width: 1023px) {
  .ce-sol-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 639px) {
  .ce-sol-grid { grid-template-columns: 1fr; }
  /* Mobile: reveal becomes an inline accordion (opens on tap/focus) */
  .ce-sol-card__reveal {
    position: static;
    inset: auto;
    max-height: 0;
    padding: 0 1.5rem;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: 0;
    border-top: 1px solid rgba(201, 71, 225, 0.3);
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    background-image: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    overflow: hidden;
    transition: max-height .35s ease, padding .35s ease;
  }
  .ce-sol-card:hover .ce-sol-card__reveal,
  .ce-sol-card:focus-within .ce-sol-card__reveal {
    max-height: 700px;
    padding: 1rem 1.5rem 1.2rem;
  }
  .ce-sol-grid:has(.ce-sol-card:hover) .ce-sol-card:not(:hover),
  .ce-sol-grid:has(.ce-sol-card:focus-within) .ce-sol-card:not(:focus-within) {
    opacity: 1;
  }
}

/* --- Section 6: avoid single-word last lines (widows) in the body paragraphs */
#market-size-validation .fa-prose p {
  text-wrap: pretty;
}

/* --- Section 6: right-align the CTA button row */
.ce-btnrow-right {
  justify-content: flex-end;
}

/* --- Section 6: magenta (subrosa-pink) bold emphasis for key lines */
.ce-brand-em { color: var(--brand); font-weight: 700; }
.fa-prose p.ce-brand-em { color: var(--brand); font-weight: 700; }

/* --- Section 6: pull the body text closer to the "Rare Diseases Market Size
   Validation" kicker (the default .s-sub margin-bottom is large) */
.ce-kicker-tight {
  margin-bottom: 0.6rem;
}

/* --- Section 6: extra top spacing for the closing "Insights..." tagline */
.ce-tagline-spaced {
  margin-top: 1rem;
}

/* --- Section 6: keep the "Massive Gap..." heading on a single line (desktop).
   Font scales with viewport so it fits; wraps again on narrow screens. */
.ce-heading-1line {
  white-space: nowrap;
  font-size: clamp(1.1rem, 2.6vw, 2.2rem);
}
@media (max-width: 760px) {
  .ce-heading-1line { white-space: normal; }
}

/* --- Section 10b: Commercial & Reimbursement role cards — always-visible
   ft-card grid (no carousel). 3 / 2 / 1 columns, equal height. The ft-card__head /
   __role / __acr / __body / bullet styles come from styles.css; here we only add the
   grid + card container (global container styling lives on .svc-tile--ft.ft-card). */
.ce-roles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  margin-top: 2.5rem;
}
.ce-roles-grid .ce-rolecard {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(201, 71, 225, 0.28);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(40, 40, 70, 0.08);
}
/* light section: dark body text on white cards (override the global white) */
.ce-roles-grid .ft-card__body li { color: #2a2a33; }
.ce-roles-grid .ft-card__head {
  align-items: center;
  text-align: center;
}
.ce-roles-grid .ft-card__role {
  margin: 0;
}
@media (max-width: 1199px) {
  .ce-roles-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .ce-roles-grid { grid-template-columns: 1fr; }
}

/* --- Section 9: extra spacing below the field-role chips */
#field-teams .medsol-roles {
  margin-bottom: 2.75rem;
}

/* --- Section 8: patient-finding channels as horizontal carousel cards
   (light section; fixed-width tiles form a scrollable row, driven by the
   existing svc-carousel JS in script-sub.js). */
.ce-channel {
  flex: 0 0 clamp(250px, 80vw, 300px);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.6rem 1.5rem;
  background: #ffffff;
  border: 1px solid rgba(201, 71, 225, 0.35);
  border-radius: 16px;
  box-shadow: 0 12px 34px rgba(40, 40, 70, 0.16);
}
.ce-channel__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 12px;
  color: var(--brand);
  background: rgba(201, 71, 225, 0.12);
}
.ce-channel__title {
  margin: 0.2rem 0 0;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.1rem;
  line-height: 1.25;
  color: #14141c;
}
.ce-channel__body {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(20, 20, 28, 0.92);
}

/* --- Section 11: operating models (left -> right, increasing involvement) -- */
.ce-models {
  margin-top: 2rem;
}
.ce-models__scale {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.4rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.ce-models__scale::after {
  content: "";
  flex: 1 1 auto;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(201, 71, 225, 0.12), var(--brand));
}
.ce-models__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
}
.ce-model {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.3rem 1.15rem 1.4rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-top: 3px solid var(--brand);
}
.ce-model__step {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  font-family: var(--font-hero);
  font-size: 1.2rem;
  line-height: 1;
  color: #fff;
  background: var(--brand);
  border-radius: 50%;
}
.ce-model__title {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-light);
}
.ce-model__action {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand);
}
.ce-model__desc {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* --- Section 11: operating-models CAROUSEL --------------------------------
   Equal-width cards in an auto-scrolling marquee track. Card look is inherited
   from .ce-model above; here we set fixed WIDTH only — height is equalised by
   the flex row (align-items: stretch) to the tallest card, so no text is ever
   clipped. JS (core_card_carousel.js) drives the loop. */
.ce-carousel {
  --ce-card-w: 320px;
  position: relative;
  margin-top: 1rem;
}
.ce-carousel__viewport {
  overflow: hidden;
  touch-action: pan-y;          /* allow vertical page scroll; JS handles horizontal drag */
}
.ce-carousel__track {
  display: flex;
  gap: 1rem;
  align-items: stretch;         /* every card stretches to the tallest card's height */
  will-change: transform;
}
.ce-carousel.is-dragging,
.ce-carousel__viewport.is-dragging { cursor: grabbing; }
.ce-carousel__viewport.is-dragging { user-select: none; }

/* Fixed width; height comes from the tallest card. No clipping — full copy shows;
   shorter cards simply keep whitespace at the bottom. */
.ce-carousel .ce-model {
  flex: 0 0 var(--ce-card-w);
  width: var(--ce-card-w);
  margin: 0;
  box-sizing: border-box;
  padding-bottom: 1.6rem;       /* keep the last line clear of the card edge */
}
.ce-carousel .ce-model__title {
  color: #ffffff;               /* strong white title */
}
.ce-carousel .ce-model__action {
  color: #ecb4f5;               /* lighter, more readable rosa */
  font-weight: 700;
}
.ce-carousel .ce-model__desc {
  color: rgba(255, 255, 255, 0.92);   /* near-white, high-contrast body */
  font-size: 0.96rem;
  line-height: 1.65;
}

/* Controls bar — reachable on every breakpoint. */
.ce-carousel__controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.ce-carousel__btn {
  display: inline-grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  color: var(--brand);
  background: rgba(201, 71, 225, 0.10);
  border: 1px solid rgba(201, 71, 225, 0.35);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}
.ce-carousel__btn:hover {
  background: rgba(201, 71, 225, 0.20);
  border-color: var(--brand);
  transform: translateY(-1px);
}
.ce-carousel__btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.ce-carousel__btn svg { width: 1.25rem; height: 1.25rem; }
.ce-carousel__ico--play { display: none; }
/* When paused, show play instead of pause. */
.ce-carousel__toggle.is-paused .ce-carousel__ico--pause { display: none; }
.ce-carousel__toggle.is-paused .ce-carousel__ico--play { display: block; }

@media (max-width: 1023px) {
  .ce-carousel { --ce-card-w: 300px; }
}
@media (max-width: 639px) {
  /* ~1.1 cards visible: a peek of the next card signals scrollability. */
  .ce-carousel { --ce-card-w: min(82vw, 360px); }
}

/* --- Section 13: check-list ----------------------------------------------- */
.ce-checklist {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}
.ce-checklist li {
  position: relative;
  padding-left: 2rem;
  line-height: 1.55;
  color: var(--text-muted);
}
.ce-checklist li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0;
  display: inline-grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  background: var(--brand);
  border-radius: 50%;
}

/* Section 12 heading: keep "Extend Your Commercial Reach…" on one line, still large */
#remote-teams .s-heading {
  white-space: nowrap;
  font-size: clamp(0.85rem, 3.55vw, 2.85rem);
}

/* Extra top spacing above the "Why 42health…" subheading */
.ce-why42-spaced { margin-top: 2.75rem; }

/* "What we can do." — larger, subrosa pink */
.ce-whatwecando {
  color: var(--brand);
  font-weight: 700;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
}
