/* ============================================================================
   core_solution_cards — reusable hover-reveal "solution" card grid.
   CSP-strict: external stylesheet only, no inline styles.

   First used by "Our Integrated Commercial Solutions" (Commercial Engagements);
   reused on "Partnering, CFO-Services & Funds" (subrosa Capital). Single source
   of truth so design + hover behaviour stay 100% consistent across pages.

   Dark cinematic card with deep purple/navy gradient, top magenta accent line,
   soft border, magenta pill label, large gradient number, white title, muted
   subtitle. On :hover / :focus-within a magenta-glowing reveal panel covers the
   card with the full descriptive text (internal scroll if it overflows; card
   size stays fixed). Cards are focusable (tabindex="0") so touch devices get
   tap-to-open / tap-away-to-close. 3 / 2 / 1 columns; on mobile the reveal
   becomes an inline accordion. Relies on design tokens from styles.css.

   Markup:
     <div class="ce-sol-grid reveal-s">
       <article class="ce-sol-card" tabindex="0">
         <span class="ce-sol-card__brand">LABEL</span>
         <span class="ce-sol-card__num">01</span>
         <h3 class="ce-sol-card__title">Title</h3>
         <p class="ce-sol-card__headline">Subtitle</p>
         <div class="ce-sol-card__reveal">
           <h3 class="ce-sol-card__reveal-title">Title</h3>
           <p class="ce-sol-card__body">Full descriptive text…</p>
         </div>
       </article>
       ...
     </div>
   ========================================================================== */

.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;
  }
}
