/* Cases gallery (/cases/): editorial index of every case. Light like the home cases section (#f7f8fc, #243148 title
   with the second line in #6c698e), between the site header and the home's closing CTA. Content width 1193px. */
.phg { background: #f7f8fc; color: #243148; font-family: Sora, system-ui, sans-serif; overflow-x: clip; }
.phg-wrap { width: min(calc(100% - 64px), 1193px); margin-inline: auto; }

/* Opening */
.phg-hero { padding: 64px 0 44px; }
.phg-hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; align-items: end; }
.phg-kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; font-size: 10px; font-weight: 500; letter-spacing: 1.8px; color: #65738c; }
.phg-kicker span { width: 6px; height: 6px; border-radius: 50%; background: #817bb0; flex: none; }
.phg-hero h1 { margin: 0; font-size: clamp(38px, 4.6vw, 57px); line-height: 1.08; font-weight: 500; letter-spacing: -2.8px; color: #243148; text-wrap: balance; }
.phg-hero h1 span { display: block; color: #6c698e; }
.phg-lead { margin: 0; max-width: 470px; font-size: 15px; line-height: 1.75; color: #52617a; text-wrap: pretty; }
.phg-count { margin: 18px 0 0; font-size: 12px; letter-spacing: .2px; color: #7a869b; }

/* Toolbar: title + segment chips (one line; scrolls sideways when it does not fit) */
.phg-list { padding: 0 0 88px; }
.phg-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 0; margin-bottom: 28px; border-top: 1px solid #dfe5ee; border-bottom: 1px solid #dfe5ee; }
.phg-toolbar h2 { margin: 0; font-size: 15px; font-weight: 500; letter-spacing: -.2px; color: #243148; white-space: nowrap; }
.phg-filters { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.phg-filters::-webkit-scrollbar { display: none; }
.phg-filters button { appearance: none; flex: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 15px; border: 1px solid #d4deed; border-radius: 999px; background: #fff; color: #3d506f; font: 500 12.5px Sora, system-ui, sans-serif; cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.phg-filters button small { font-size: 11px; color: #8a96aa; font-variant-numeric: tabular-nums; }
.phg-filters button:hover { border-color: #9fb2cf; }
.phg-filters button[aria-pressed=true] { background: #243148; border-color: #243148; color: #fff; }
.phg-filters button[aria-pressed=true] small { color: #b8c6dc; }
.phg-filters button:focus-visible { outline: 2px solid #2458f5; outline-offset: 3px; }

/* Cards */
.phg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.phg-card { min-width: 0; }
.phg-card[hidden] { display: none; }
.phg-card-link { height: 100%; display: flex; flex-direction: column; background: #fff; border: 1px solid #e3e8f0; border-radius: 20px; overflow: hidden; color: inherit; text-decoration: none; box-shadow: 0 1px 2px #1018280a; transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s, border-color .35s; }
.phg-card-link:hover { transform: translateY(-3px); border-color: #d2dbe8; box-shadow: 0 22px 44px -24px #24314859; }
.phg-card-link:focus-visible { outline: 2px solid #2458f5; outline-offset: 4px; }
.phg-cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #0d1521; }
.phg-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.phg-card-link:hover .phg-cover img { transform: scale(1.035); }
.phg-badge { position: absolute; left: 16px; top: 16px; padding: 7px 11px; border-radius: 999px; background: #080c15b8; color: #eef4ff; font-size: 11px; letter-spacing: .3px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.phg-body { flex: 1; display: flex; flex-direction: column; padding: 22px 24px 24px; }
.phg-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; margin-bottom: 18px; }
.phg-logo { display: block; height: 24px; width: auto; max-width: 150px; object-fit: contain; object-position: left center; }
.phg-logo-mono { filter: brightness(0); opacity: .82; }
.phg-logo-crop { height: 40px; }
.phg-index { font-size: 11px; letter-spacing: 1.4px; color: #8a96aa; white-space: nowrap; font-variant-numeric: tabular-nums; }
.phg-category { margin: 0 0 10px; font-size: 11px; font-weight: 500; letter-spacing: 1.2px; text-transform: uppercase; color: #65738c; }
.phg-card h3 { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 500; letter-spacing: -.5px; color: #243148; text-wrap: balance; }
.phg-excerpt { margin: 12px 0 0; font-size: 13.5px; line-height: 1.7; color: #5a6880; text-wrap: pretty; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.phg-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: auto 0 0; padding-top: 22px; }
.phg-metrics > div { padding-top: 16px; border-top: 1px solid #e6ebf2; min-width: 0; }
.phg-metrics > div:nth-child(n+3) { display: none; }
.phg-metrics dt { font-size: 26px; line-height: 1.1; font-weight: 500; letter-spacing: -.05em; white-space: nowrap; font-variant-numeric: tabular-nums; color: #3456b3; background: linear-gradient(145deg, #24498f 15%, #576ec4 67%, #8276b0); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.phg-metrics dd { margin: 7px 0 0; font-size: 12px; line-height: 1.55; color: #62718a; text-wrap: pretty; }
.phg-more { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; font-size: 13px; font-weight: 500; color: #3456b3; }
.phg-more svg { width: 17px; height: 17px; transition: transform .3s; }
.phg-card-link:hover .phg-more svg { transform: translateX(4px); }
.phg-empty { margin: 8px 0 0; font-size: 14px; color: #62718a; }

/* The first card shown is the wide one (featured on the full list; the first match when filtered). */
.phg-card.is-lead { grid-column: 1 / -1; }
.phg-card.is-lead .phg-card-link { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.phg-card.is-lead .phg-cover { aspect-ratio: auto; min-height: 100%; }
.phg-card.is-lead .phg-body { padding: 34px 38px 36px; }
.phg-card.is-lead h3 { font-size: clamp(24px, 2.4vw, 31px); letter-spacing: -1px; }
.phg-card.is-lead .phg-excerpt { font-size: 14.5px; -webkit-line-clamp: 4; }
.phg-card.is-lead .phg-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.phg-card.is-lead .phg-metrics > div:nth-child(3) { display: block; }

/* Closing CTA: the home's block (.ph-why-cta) on its dark section, without the rule it uses after the reasons. */
.phg-cta .ph-why-cta { border-top: 0; margin-top: 0; padding-top: 0; }
/* The home uses an h3 there; on this page it is the section title (h2) with the same look. */
.phg-cta .phg-cta-title { max-width: 700px; margin: 0; color: #eff6ff; font-size: clamp(25px, 3vw, 36px); line-height: 1.25; letter-spacing: -1.15px; font-weight: 500; text-wrap: balance; }
@media (max-width: 779px) { .phg-cta .phg-cta-title { font-size: 27px; } .phg-cta .ph-why-cta-kicker { font-size: 11px; letter-spacing: 1.6px; } .phg-cta .ph-why-cta-action > span { font-size: 11.5px; } }

/* Entrance: only when the page script runs (it adds .phg-anim); content never depends on it. The animation fills
   backwards only, so the hover lift still works once a card is in. */
.phg-anim .phg-card:not([data-phg-in]) .phg-card-link { opacity: 0; }
.phg-anim .phg-card[data-phg-in] .phg-card-link { animation: phg-in .7s cubic-bezier(.2, .7, .2, 1) backwards; animation-delay: var(--phg-d, 0ms); }
@keyframes phg-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .phg-anim .phg-card:not([data-phg-in]) .phg-card-link { opacity: 1; }
  .phg-anim .phg-card[data-phg-in] .phg-card-link { animation: none; }
  .phg-card-link, .phg-card-link:hover, .phg-cover img, .phg-card-link:hover .phg-cover img, .phg-more svg { transition: none; transform: none; }
}

@media (max-width: 1080px) {
  .phg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 779px) {
  .phg-wrap { width: calc(100% - 40px); }
  .phg-hero { padding: 40px 0 30px; }
  .phg-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .phg-kicker { font-size: 11px; letter-spacing: 1.6px; margin-bottom: 16px; }
  .phg-hero h1 { font-size: 38px; letter-spacing: -1.6px; }
  .phg-lead { font-size: 15px; }
  .phg-count { margin-top: 12px; }
  .phg-list { padding-bottom: 60px; }
  .phg-toolbar { flex-direction: column; align-items: stretch; gap: 14px; padding: 18px 0; margin-bottom: 20px; }
  .phg-filters { margin-inline: calc(50% - 50vw); padding-inline: calc(50vw - 50%); }
  .phg-filters button { font-size: 13px; }
  .phg-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .phg-card.is-lead .phg-card-link { display: flex; }
  .phg-card.is-lead .phg-cover { aspect-ratio: 16 / 9; min-height: 0; }
  .phg-card.is-lead .phg-body,
  .phg-body { padding: 20px 20px 22px; }
  .phg-card h3,
  .phg-card.is-lead h3 { font-size: 21px; letter-spacing: -.5px; }
  .phg-excerpt,
  .phg-card.is-lead .phg-excerpt { font-size: 14px; }
  .phg-card.is-lead .phg-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phg-card.is-lead .phg-metrics > div:nth-child(3) { display: none; }
  .phg-metrics dd { font-size: 12px; }
}
