/* Customer Case Root V1 page composition. Public modules own feed and pagination. */
.case-root-v1-page { min-width: 0; }

.case-root-v1 {
  min-width: 0;
  overflow: clip;
  color: var(--ui-color-text, #334155);
  background: var(--ui-color-page, #fff);
}

.case-root-v1 *,
.case-root-v1 *::before,
.case-root-v1 *::after { box-sizing: border-box; }

.case-root-v1__breadcrumb-bar {
  position: relative;
  z-index: 3;
  border-bottom: 1px solid var(--ui-color-border-subtle, #e2e8f0);
  background: color-mix(in srgb, var(--ui-color-surface, #fff) 92%, transparent);
  backdrop-filter: blur(12px);
}

.case-root-v1__breadcrumb-bar .ui-breadcrumbs { margin: 0; }

.case-root-v1__hero {
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: var(--case-root-hero-min-height, 420px);
  overflow: hidden;
  color: var(--ui-color-text, #334155);
  background: var(--case-root-hero-background-start, #f8fafc);
}

.case-root-v1__hero-image-layer {
  position: absolute;
  inset: 0;
  z-index: -2;
  display: flex;
  overflow: hidden;
  opacity: .9;
  pointer-events: none;
}

.case-root-v1__hero-image {
  display: block;
  width: 100%;
  height: auto;
  align-self: stretch;
  object-fit: cover;
  object-position: var(--case-root-hero-image-position, 76% center);
}

.case-root-v1__hero[data-hero-image-position="auto"] { --case-root-hero-image-position: 76% center; }
.case-root-v1__hero[data-hero-image-position="left"] { --case-root-hero-image-position: left center; }
.case-root-v1__hero[data-hero-image-position="center"] { --case-root-hero-image-position: center; }
.case-root-v1__hero[data-hero-image-position="right"] { --case-root-hero-image-position: right center; }

.case-root-v1__hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 82% 18%, color-mix(in srgb, var(--case-root-hero-accent, #0891b2) 19%, transparent), transparent 36%),
    linear-gradient(118deg, color-mix(in srgb, var(--case-root-hero-background-start, #f8fafc) 97%, transparent), color-mix(in srgb, var(--case-root-hero-background-end, #cffafe) 90%, transparent));
  opacity: var(--case-root-hero-overlay-strength, .9);
}

.case-root-v1__hero[data-section-background="white"]::after { background: #fff; }
.case-root-v1__hero[data-section-background="surface"]::after { background: var(--ui-color-surface-muted, #f8fafc); }
.case-root-v1__hero[data-section-background="accent-soft"]::after {
  background: color-mix(in srgb, var(--case-root-hero-accent, #0891b2) 10%, var(--ui-color-surface, #fff));
}
.case-root-v1__hero[data-section-background="brand-gradient"]::after,
.case-root-v1__hero[data-section-background="custom"][data-section-background-fill="gradient"]::after {
  background: linear-gradient(
    var(--case-root-hero-background-angle, 115deg),
    var(--case-root-hero-background-start, #0f172a),
    var(--case-root-hero-background-end, #312e81)
  );
}
.case-root-v1__hero[data-section-background="custom"][data-section-background-fill="solid"]::after {
  background: var(--case-root-hero-background-start, #fff);
}

.case-root-v1__hero[data-foreground="light"] {
  --case-root-hero-title-inherit: var(--ui-color-on-accent, #fff);
  --case-root-hero-description-inherit: rgba(255, 255, 255, .78);
  color: #e2e8f0;
}

.case-root-v1__hero-inner {
  display: grid;
  min-height: var(--case-root-hero-min-height, 420px);
  align-items: center;
  justify-content: start;
  grid-template-columns: minmax(0, 740px);
  padding-block: clamp(56px, 7vw, 82px);
}

.case-root-v1__hero-copy {
  min-width: 0;
  max-width: 740px;
  text-align: left;
}

.case-root-v1__hero[data-title-align="center"] .case-root-v1__hero-inner { justify-content: center; }
.case-root-v1__hero[data-title-align="right"] .case-root-v1__hero-inner { justify-content: end; }
.case-root-v1__hero[data-title-align="center"] .case-root-v1__hero-copy { text-align: center; }
.case-root-v1__hero[data-title-align="right"] .case-root-v1__hero-copy { text-align: right; }

.case-root-v1__hero .case-root-v1__hero-eyebrow {
  --ui-eyebrow-resolved-color: var(--case-root-hero-eyebrow-color, var(--case-root-hero-accent));
  --page-module-eyebrow-size: var(--case-root-hero-eyebrow-size, 12px);
}

.case-root-v1__hero h1 {
  max-width: 800px;
  margin: 14px 0 18px;
  color: var(--case-root-hero-title-color, var(--case-root-hero-title-inherit, var(--ui-color-text-strong, #0f172a)));
  font-size: min(var(--case-root-hero-title-size, 50px), clamp(38px, 5vw, 58px));
  font-weight: var(--case-root-hero-title-weight, 700);
  line-height: 1.08;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.case-root-v1__hero-description {
  max-width: 660px;
  margin: 18px 0 0;
  color: var(--case-root-hero-description-color, var(--case-root-hero-description-inherit, var(--ui-color-text-muted, #64748b)));
  font-size: var(--case-root-hero-description-size, 16px);
  line-height: 1.75;
}

.case-root-v1__hero[data-title-align="center"] .case-root-v1__hero-description {
  margin-inline: auto;
  margin-top: 18px;
}
.case-root-v1__hero[data-title-align="right"] .case-root-v1__hero-description { margin: 18px 0 0 auto; }

.case-root-v1__hero-actions {
  --ui-color-accent: var(--case-root-hero-action-color, var(--theme-accent, #0891b2));
  --ui-color-accent-deep: color-mix(in srgb, var(--case-root-hero-action-color, var(--theme-accent, #0891b2)) 78%, #0f172a);
  --ui-color-accent-soft: color-mix(in srgb, var(--case-root-hero-action-color, var(--theme-accent, #0891b2)) 12%, transparent);
  --ui-action-radius: var(--case-root-hero-action-radius, var(--ui-radius-sm));
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.case-root-v1__hero[data-title-align="center"] .case-root-v1__hero-actions { justify-content: center; }
.case-root-v1__hero[data-title-align="right"] .case-root-v1__hero-actions { justify-content: flex-end; }

.case-root-v1 > #case-root-directory,
.case-root-v1 > #case-root-cta {
  --page-module-section-padding: clamp(68px, 6.8vw, 96px);
}

.case-root-v1 > #case-root-industries {
  --page-module-section-padding: clamp(20px, 2.2vw, 28px);
}

/* Customer Case Root maps the public "inherit" Section Background to the
 * shared ambient wash. Explicit white, surface, accent-soft and custom
 * selections remain owned by the public Section Background contract. */
.case-root-v1 > #case-root-industries,
.case-root-v1 > #case-root-directory {
  --page-module-page-background: var(--ui-section-bg-ambient-wash);
}

.case-root-v1 > #case-root-directory {
  --ui-section-ambient-x: 88%;
  --ui-section-ambient-y: 10%;
}

.case-root-v1 > #case-root-industries {
  --ui-section-ambient-x: 12%;
  --ui-section-ambient-y: 12%;
}

.case-root-v1__industry-strip {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: clamp(18px, 2.4vw, 32px);
  padding-block: 4px;
}

.case-root-v1__industries .case-root-v1__industry-label {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--page-module-title-color, var(--ui-color-text-strong, #0f172a));
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .025em;
  white-space: nowrap;
}

.case-root-v1__industry-icon {
  display: inline-grid;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  place-items: center;
  color: var(--page-module-accent, #0891b2);
  border-radius: 8px;
  background: color-mix(in srgb, var(--page-module-accent, #0891b2) 8%, var(--ui-color-surface, #fff));
}

.case-root-v1__industry-icon svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.case-root-v1__industry-list {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.case-root-v1__industry-item {
  display: inline-flex;
  align-items: center;
  color: var(--page-module-intro-color, var(--ui-color-text-muted, #64748b));
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
  white-space: nowrap;
}

.case-root-v1__industry-item::before {
  flex: 0 0 3px;
  margin-right: 8px;
  width: 3px;
  height: 3px;
  background: color-mix(in srgb, var(--page-module-accent, #0891b2) 58%, var(--ui-color-border, #cbd5e1));
  border-radius: 50%;
  content: "";
}

.case-root-v1__industries[data-title-align="center"] .case-root-v1__industry-strip { justify-content: center; }
.case-root-v1__industries[data-title-align="center"] .case-root-v1__industry-list { flex: 0 1 auto; }
.case-root-v1__industries[data-title-align="right"] .case-root-v1__industry-strip { justify-content: flex-end; }
.case-root-v1__industries[data-title-align="right"] .case-root-v1__industry-list { flex: 0 1 auto; }

/* Case Directory owns a project-evidence record rather than a generic
 * article/card skin. The public Section shell, typography variables and
 * pagination remain the upstream owners around this page-specific content. */
.case-root-v1 .case-evidence-directory {
  display: grid;
  min-width: 0;
  gap: clamp(22px, 3vw, 34px);
  margin-top: clamp(22px, 2vw, 28px);
  padding-top: clamp(26px, 2.5vw, 34px);
  border-top: 1px solid var(--ui-color-border, #dbe4ee);
}

/* The Case evidence directory's simple presentation is a borderless record
 * list, not a white card stack. Public Card Surface still owns the other
 * selectable styles; this narrow Page Type bridge restores the approved
 * transparent simple surface and uses a single edge only between records. */
.case-root-v1 #case-root-directory.is-card-style-simple .case-evidence-card,
.case-root-v1 #case-root-directory.is-card-style-simple .case-evidence-card__body {
  background: transparent;
}

.case-root-v1 .case-evidence-directory__separator {
  display: none;
}

.case-root-v1 #case-root-directory.is-card-style-simple .case-evidence-directory {
  gap: 0;
}

.case-root-v1 #case-root-directory.is-card-style-simple .case-evidence-directory__separator {
  display: block;
  height: 1px;
  margin: clamp(11px, 1.5vw, 17px) 0;
  background: var(--ui-color-border, #dbe4ee);
}

.case-root-v1 .case-evidence-card {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(260px, 27%) minmax(0, 1fr);
  gap: clamp(4px, 1vw, 12px);
  padding: 0;
  color: inherit;
  text-decoration: none;
}

.case-root-v1 .case-evidence-card__media {
  display: block;
  min-width: 0;
  position: relative;
  min-height: 0;
  margin: var(--page-module-card-padding, 24px) 0 var(--page-module-card-padding, 24px) var(--page-module-card-padding, 24px);
  align-self: stretch;
  overflow: hidden;
  border-radius: var(--ui-radius-sm, 8px);
  background: var(--ui-color-surface-muted, #f1f5f9);
}

.case-root-v1 .case-evidence-card__media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--ui-motion-duration-base, 240ms) ease;
}

.case-root-v1 .case-evidence-card__media-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: inherit;
  place-items: center;
  color: var(--ui-color-text-faint, #94a3b8);
  font-size: 34px;
}

.case-root-v1 .case-evidence-card__body {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.case-root-v1 .case-evidence-card__industry {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  min-height: 32px;
  align-items: center;
  padding: 5px 13px;
  color: var(--page-module-accent, #0891b2);
  border-radius: var(--ui-radius-xs, 6px);
  background: color-mix(in srgb, var(--page-module-accent, #0891b2) 8%, #fff);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}

.case-root-v1 .case-evidence-card__title {
  margin: 15px 0 0;
  color: var(--page-module-card-title-color, var(--ui-color-text-strong, #0f172a));
  font-size: clamp(22px, calc(var(--page-module-card-title-size, 15px) * 1.6), 26px);
  font-weight: var(--page-module-card-title-weight, 700);
  line-height: 1.4;
  letter-spacing: -.02em;
  transition: color var(--ui-motion-duration-fast, 180ms) ease;
}

.case-root-v1 .case-evidence-card__summary {
  display: -webkit-box;
  margin-top: 10px;
  overflow: hidden;
  color: var(--page-module-card-description-color, var(--ui-color-text, #475569));
  font-size: max(var(--page-module-card-description-size, 14px), 16px);
  line-height: 1.8;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.case-root-v1 .case-evidence-card__facts {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 22px;
  margin-top: 17px;
  padding: 16px 19px;
  border-radius: var(--ui-radius-sm, 8px);
  background: color-mix(in srgb, var(--page-module-accent, #0891b2) 10%, var(--ui-color-surface-muted, #f1f5f9) 90%);
}

.case-root-v1 .case-evidence-card__fact {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.case-root-v1 .case-evidence-card__fact-label {
  color: var(--ui-color-text-faint, #94a3b8);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

.case-root-v1 .case-evidence-card__fact-value,
.case-root-v1 .case-evidence-card__result-value {
  color: var(--ui-color-text-strong, #0f172a);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
}

.case-root-v1 .case-evidence-card__result {
  display: grid;
  min-width: 0;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
  margin-top: 11px;
}

.case-root-v1 .case-evidence-card__result-value {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ui-color-text, #475569);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.case-root-v1 .case-evidence-card__footer {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 0;
  padding-top: 17px;
}

.case-root-v1 .case-evidence-card__delivery {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 16px;
  color: var(--ui-color-text-faint, #94a3b8);
  font-size: 14px;
  line-height: 1.5;
}

.case-root-v1 .case-evidence-card__published,
.case-root-v1 .case-evidence-card__duration,
.case-root-v1 .case-evidence-card__entry {
  display: inline-flex;
  align-items: center;
}

.case-root-v1 .case-evidence-card__published { gap: 6px; }

.case-root-v1 .case-evidence-card__published .fa {
  color: color-mix(in srgb, var(--page-module-accent, #0891b2) 62%, var(--ui-color-text-faint, #94a3b8));
  font-size: 13px;
}

.case-root-v1 .case-evidence-card__entry {
  flex: 0 0 auto;
  gap: 7px;
  color: var(--page-module-accent, #0891b2);
  font-size: max(var(--page-module-link-size, 14px), 15px);
  font-weight: 600;
  white-space: nowrap;
}

.case-root-v1 .case-evidence-card__entry .fa {
  font-size: .9em;
  transition: transform var(--ui-motion-duration-fast, 180ms) ease;
}

@media (max-width: 1100px) {
  .case-root-v1 .case-evidence-card {
    grid-template-columns: minmax(232px, 30%) minmax(0, 1fr);
    gap: 28px;
  }

  .case-root-v1 .case-evidence-card__facts {
    gap: 14px 18px;
  }
}

@media (max-width: 900px) {
  .case-root-v1 .case-evidence-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .case-root-v1 .case-evidence-card__media {
    /* A definite width prevents WebKit shrinking this aspect-ratio grid item to zero. */
    width: calc(100% - 36px);
    min-height: 0;
    margin: 18px 18px 0;
    aspect-ratio: 16 / 9;
  }

  .case-root-v1 .case-evidence-directory[data-mobile-media-order="content-first"] .case-evidence-card__media {
    grid-row: 2;
  }

  .case-root-v1 .case-evidence-directory[data-mobile-media-order="content-first"] .case-evidence-card__body {
    grid-row: 1;
  }
}

@media (max-width: 767px) {
  .case-root-v1__hero,
  .case-root-v1__hero-inner { min-height: var(--case-root-hero-min-height, 420px); }
  .case-root-v1__hero[data-hero-image-position="auto"] { --case-root-hero-image-position: 68% center; }
  .case-root-v1__hero-inner { padding-block: 44px 50px; }
  .case-root-v1__hero[data-mobile-title-align="left"] .case-root-v1__hero-inner { justify-content: start; }
  .case-root-v1__hero[data-mobile-title-align="left"] .case-root-v1__hero-copy { text-align: left; }
  .case-root-v1__hero[data-mobile-title-align="left"] .case-root-v1__hero-description { margin: 18px 0 0; }
  .case-root-v1__hero[data-mobile-title-align="left"] .case-root-v1__hero-actions { justify-content: flex-start; }
  .case-root-v1__hero[data-mobile-title-align="center"] .case-root-v1__hero-inner { justify-content: center; }
  .case-root-v1__hero[data-mobile-title-align="center"] .case-root-v1__hero-copy { text-align: center; }
  .case-root-v1__hero[data-mobile-title-align="center"] .case-root-v1__hero-description { margin-inline: auto; margin-top: 18px; }
  .case-root-v1__hero[data-mobile-title-align="center"] .case-root-v1__hero-actions { justify-content: center; }
  
  .case-root-v1__hero-actions { align-items: stretch; flex-direction: column; }
  .case-root-v1__hero-actions > a { width: 100%; }
  .case-root-v1__industry-strip { align-items: flex-start; flex-direction: column; gap: 8px; }
  .case-root-v1__industries .case-root-v1__industry-label { white-space: normal; }
  .case-root-v1__industry-list { flex: none; width: 100%; }
  .case-root-v1__industries[data-mobile-title-align="center"] .case-root-v1__industry-strip { align-items: center; }
  .case-root-v1__industries[data-mobile-title-align="center"] .case-root-v1__industry-list { justify-content: center; }
  .case-root-v1__industries[data-mobile-title-align="left"] .case-root-v1__industry-strip { align-items: flex-start; }
  .case-root-v1__industries[data-mobile-title-align="left"] .case-root-v1__industry-list { justify-content: flex-start; }
  .case-root-v1__industries[data-mobile-title-align="right"] .case-root-v1__industry-strip { align-items: flex-end; }
  .case-root-v1__industries[data-mobile-title-align="right"] .case-root-v1__industry-list { justify-content: flex-end; }
  .case-root-v1 .case-evidence-directory { gap: 22px; margin-top: 20px; padding-top: 24px; }
  .case-root-v1 .case-evidence-card__title { font-size: 20px; line-height: 1.45; }
  .case-root-v1 .case-evidence-card__summary { font-size: 14px; -webkit-line-clamp: 4; }
  .case-root-v1 .case-evidence-card__facts { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .case-root-v1 .case-evidence-card__result { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .case-root-v1 .case-evidence-card__result-value { -webkit-line-clamp: 2; }
  .case-root-v1 .case-evidence-card__footer { align-items: flex-start; flex-direction: column; gap: 11px; }
}

@media (max-width: 420px) {
  
}

@media (prefers-reduced-motion: reduce) {
  .case-root-v1 .case-evidence-card__media img,
  .case-root-v1 .case-evidence-card__title,
  .case-root-v1 .case-evidence-card__entry .fa { transition: none; }
}

/* Mobile H1 scale: preserve smaller editor values; desktop/tablet stay unchanged. */
@media (max-width: 767px) {
  .case-root-v1__hero h1 {
    font-size: min(var(--case-root-hero-title-size, 50px), 26px);
    line-height: 1.4;
  }
}

@media (max-width: 360px) {
  .case-root-v1__hero h1 {
    font-size: min(var(--case-root-hero-title-size, 50px), 24px);
  }
}

/* Supply the public outline-button token only inside a light-foreground hero. */
.case-root-v1__hero[data-foreground="light"] .case-root-v1__hero-actions {
  --ui-color-text-secondary: var(--ui-color-on-accent, #f8fafc);
}
