/* ============================================================
   KIBO B2C Commerce page (src/pages/platform/commerce-new.astro), loaded only
   on that page, after public/home/tokens.css, public/home/home.css (buttons,
   hero backdrop, analyst rows, closing band), public/search/search.css
   (section bands, customer strip, tab rails, platform cards, FAQ, resource
   tiles) and public/subscription/subscription.css (outlined button, intro
   lines, lists, proof row). This file holds only what the B2C Commerce
   design adds or changes.
   Brand colors: src/styles/tokens.css. Sections in page order; each group
   names its component in src/components/sections/b2c-commerce/.
   Breakpoints: 1340 (FAQ stacks), 880 (rails become accordions, in
   search.css), 640.
   ============================================================ */

.kcom-page .kh-psec-btn--primary:focus-visible { outline: 2px solid var(--kibo-yellow); outline-offset: 3px; }
.kcom-nowrap { white-space: nowrap; }

/* ==== Hero (subscription/SubHero.astro) ==== */
.kcom-page .ks-hero h1 { font-size: clamp(36px, 4.4vw, 54px); line-height: 1.06; }
.kcom-page .ks-hero h1 em { white-space: nowrap; }

/* ==== Proof row (subscription/SubProof.astro): one row, full width ==== */
.kcom-page .ksub-proof { padding-top: 88px; padding-bottom: 88px; }
.kcom-page .ksub-proof__shade { display: none; }
.kcom-page .ksub-proof__list { width: auto; max-width: 1216px; }
.kcom-page .ksub-proof .ksub-proof__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 24px 56px; padding: 32px 0; }
.kcom-page .ksub-proof .kh-anl__brand img { height: 34px; }
.kcom-page .ksub-proof .ksub-proof__line { max-width: none; }

/* ==== Problem statement + infographic (KcomProblem.astro) ==== */
.ks-section.kcom-problem { padding-top: 80px; padding-bottom: 40px; }
.kcom-problem .ksub-problem { gap: 24px; }
.kcom-problem .ks-h2 { max-width: none; text-wrap: balance; }
.kcom-problem .ksub-lede { max-width: 760px; text-wrap: balance; }
.kcom-problem__graphic { width: 100%; max-width: 960px; margin: 0 auto; }
/* holds the drawing's space until its script loads (viewBox 960 x 450) */
kibo-unified-infographic { display: block; aspect-ratio: 960 / 450; }

/* ==== Tab rails (KcomRail.astro): Subscriptions' rail plus result boxes ==== */
.ks-section--glow.kcom-section--gold {
  background-image:
    radial-gradient(58% 68% at 14% 16%, rgba(255,206,1,.3) 0%, rgba(255,206,1,0) 62%),
    radial-gradient(46% 60% at 88% 10%, rgba(255,206,1,.22) 0%, rgba(255,206,1,0) 66%),
    radial-gradient(70% 78% at 70% 98%, rgba(255,206,1,.26) 0%, rgba(255,206,1,0) 60%);
}
.kcom-page .ksub-head__text .ksub-lede { max-width: 720px; font-size: 18px; line-height: 1.38; }
.kcom-page .ks-rail { grid-template-columns: 300px minmax(0, 1fr); }
.ks-rail__icon .kcom-icon--wide { margin-left: -8px; }
.ks-acc__panel .kcom-icon--wide { margin-left: -7px; }
/* value pillars: lighter body text */
.kcom-rail--pillars .ks-rail__body { font-size: 17px; line-height: 1.55; max-width: 62ch; }
/* capabilities: tighter tabs, smaller body and list, result boxes float right */
.kcom-rail--caps .ks-rail__tab { padding: 16px 22px; line-height: 1.28; }
.ks-rail.kcom-rail--caps .ks-rail__panel { padding: 52px 48px 44px; }
.ks-rail.kcom-rail--caps .ks-rail__icon { top: 52px; }
.ks-rail.kcom-rail--caps .ks-rail__content { display: flow-root; }
.ks-rail.kcom-rail--caps .ks-rail__content > *:not(.kcom-stats) { margin: 0 0 22px; }
.ks-rail.kcom-rail--caps .ks-rail__content > :last-child { margin-bottom: 0; }
.kcom-rail--caps .ks-rail__content h3 { max-width: 28ch; }
.kcom-rail--caps .ks-rail__body { font-size: 16px; line-height: 1.55; max-width: none; text-wrap: balance; }
.kcom-rail--caps .ksub-list { gap: 5px; max-width: none; }
.kcom-rail--caps .ksub-list li { font-size: 14px; line-height: 1.3; }
.kcom-rail--caps .ksub-list li::before { top: 7px; }

.kcom-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.ks-rail__content .kcom-stats { float: right; justify-content: flex-end; max-width: calc(100% - 104px); margin: 0 0 20px 32px; }
.kcom-stat { display: flex; flex-direction: column; gap: 5px; width: 180px; padding: 12px 16px 14px; border-radius: 5px; background: rgba(255,206,1,.08); border: 1px solid rgba(255,206,1,.45); }
.kcom-stat__num { font-size: 30px; line-height: 1; font-weight: 600; letter-spacing: -.02em; color: var(--kibo-yellow); }
.kcom-stat__label { font-size: 12.5px; line-height: 1.35; color: var(--kibo-white); text-wrap: balance; }
.kcom-stat__logo { display: block; height: 22px; width: auto; max-width: 120px; margin-top: 6px; object-fit: contain; object-position: left center; filter: brightness(0) invert(1); opacity: .9; }

/* ==== Platform cards (KcomPlatform.astro): Search's cards ==== */
.kcom-page .ks-plat__card h3 { display: block; line-height: 1.35; }
.kcom-page .ks-badge.kcom-badge { display: inline-block; vertical-align: 2px; margin-left: 6px; font-weight: 500; letter-spacing: 0; text-transform: none; padding: 1px 9px; }

/* ==== FAQ (KcomFaq.astro): Search's row, closed panels 118px ==== */
.kcom-faq__lede { margin: 12px 0 0; font-size: 17px; line-height: 1.5; color: var(--kibo-dark-grey); }
.ks-faq.kcom-faq .ks-faq__item { flex: 0 0 118px; transition: flex .7s var(--ks-ease-faq), background .5s var(--ks-ease-faq), border-color .5s var(--ks-ease-faq); }
.ks-faq.kcom-faq .ks-faq__item.is-open { flex: 1 1 0px; }
.kcom-faq .ks-faq__face { width: 300px; padding: 22px 20px; }
.kcom-faq .ks-faq__rail { padding: 24px 10px; }
.kcom-faq .kcom-faq__short { font-size: 13px; line-height: 19px; }
.kcom-faq__long { display: none; font-size: 14px; line-height: 21px; font-weight: 500; color: var(--kibo-white); text-wrap: pretty; }

/* ==== Resource tiles (KcomResources.astro): Search's tiles ==== */
.kcom-res__h { margin-bottom: 40px; }
.kcom-page .ks-res__tile { padding-top: 48px; }
.kcom-page .ks-res__icon { height: 57px; }
.kcom-page .ks-res__icon svg { overflow: visible; margin-bottom: -15px; }
.kcom-res__note { font-size: 14px; }
.kcom-res__dot { fill: var(--kibo-yellow); }

/* ==== Closing band (KcomFinalCta.astro): the homepage's FinalCTA ==== */
.kcom-page .kcom-finalcta { padding: 96px 0; }
.kcom-finalcta__in { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.kcom-page .kcom-finalcta h2 { max-width: 24ch; margin: 0 auto; font-size: clamp(28px, 3vw, 36px); line-height: 1.12; }
.kcom-page .kcom-finalcta p { max-width: 560px; margin: 0 auto; font-size: 18px; line-height: 1.45; }
.kcom-finalcta__icon { width: 184px; max-width: 100%; }
.kcom-finalcta__icon svg { display: block; width: 100%; height: auto; overflow: visible; }
.kcom-flow-line { fill: none; stroke: var(--kibo-white); stroke-width: 3; stroke-linejoin: miter; stroke-linecap: butt; }
.kcom-fill-y { fill: var(--kibo-yellow); stroke: none; }
.kcom-fill-blue { fill: var(--kh-blue); }
.kcom-cube { stroke-width: 1; stroke-linejoin: round; stroke-opacity: .55; }
.kcom-cube--y { fill: var(--kibo-yellow); stroke: var(--kibo-yellow); }
.kcom-cube--w { fill: var(--kibo-white); stroke: var(--kibo-white); }
.kcom-cube--s { fill: var(--kh-sky); stroke: var(--kh-sky); }

/* =================== Responsive =================== */

/* FAQ stacks (search.css); closed rows show the full question */
@media (max-width: 1340px) {
  .ks-faq.kcom-faq .ks-faq__item, .ks-faq.kcom-faq .ks-faq__item.is-open { flex: none; }
  .kcom-faq .kcom-faq__short { display: none; }
  .kcom-faq__long { display: block; }
  .kcom-faq .ks-faq__item.is-open .ks-faq__face { width: auto; }
}

@media (max-width: 880px) {
  .ks-acc__panel .kcom-stats { margin-top: 4px; }
}

@media (max-width: 640px) {
  .ks-section.kcom-problem { padding-top: 64px; padding-bottom: 32px; }
  .kcom-page .ksub-proof { padding-top: 64px; padding-bottom: 64px; }
  .kcom-page .ksub-proof .ksub-proof__row { gap: 16px; padding: 24px 0; }
  .kcom-page .ks-hero h1 em { white-space: normal; }
  .kcom-rail--pillars .ks-rail__body { font-size: 17px; }
  .kcom-stat { width: calc(50% - 5px); min-width: 140px; }
  .kcom-page .kcom-finalcta { padding: 72px 0; }
  .kcom-page .kcom-finalcta p { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .ks-faq.kcom-faq .ks-faq__item { transition: none !important; }
}
