/* Case Study listing only. Shared header/footer and detail styles are untouched. */
.dmw-cs {
    background: linear-gradient(115deg, #061321 12%, #071a36 45%, #083a87 100%);
    background-size: cover;
    background-position: center top;
    color: #fff;
    padding: 90px 0 0;
}
.dmw-cs, .dmw-cs * { box-sizing: border-box; }
.dmw-cs [hidden] { display: none !important; }
.dmw-cs__head { text-align: center; margin: 0 auto 80px; padding-top: 15px; }
.dmw-cs__eyebrow { margin: 0 0 20px; color: #1382f9; font-size: 18px; }
.dmw-cs__heading { color: #fff; font-size: clamp(36px, 4vw, 60px); line-height: 1.2; font-weight: 600; margin: 0 0 22px; text-wrap: balance; }
.dmw-cs-title-word { display: inline-block; background: linear-gradient(to right, #00dbd9, #4284ff 50%, #fff 50%); background-size: 200% 100%; background-position: 100% center; background-clip: text; -webkit-background-clip: text; color: transparent; transition: background-position .5s ease-in; }
.dmw-cs-title-word.is-active { background-position: 0 center; }
.dmw-cs__desc { color: #a5afbf; font-size: 21px; font-weight: 400; line-height: 1.5; max-width: 760px; margin: 0 auto; }
.dmw-cs-filters { margin-bottom: 60px; }
.dmw-cs-tabs { display: flex; gap: 48px; margin-bottom: 38px; overflow-x: auto; }
.dmw-cs-tab, .dmw-cs-pill { appearance: none; font: inherit; cursor: pointer; background: transparent; color: #8492a6; transition: color .25s ease, border-color .25s ease; }
.dmw-cs-tab { padding: 0 0 6px; border: 0; border-bottom: 1px solid transparent; font-size: 22px; white-space: nowrap; }
.dmw-cs-tab.is-active { color: #fff; border-color: currentColor; }
.dmw-cs-pills { display: flex; flex-wrap: wrap; gap: 12px 16px; }
.dmw-cs-pill { padding: 10px 12px; border: 1px solid #657185; border-radius: 4px; font-size: 14px; line-height: 1.3; }
.dmw-cs-pill.is-active, .dmw-cs-pill:hover, .dmw-cs-tab:hover { color: #fff; border-color: currentColor; }
.dmw-cs-status { margin: 0; color: #bac9e0; font-size: 15px; }
.dmw-cs-status:not(:empty) { margin-bottom: 20px; }
.dmw-cs-featured { display: flex; flex-direction: column; gap: 80px; transition: opacity .25s ease; }
.dmw-cs-results[aria-busy="true"] .dmw-cs-featured { opacity: .5; }
.dmw-cs-empty { text-align: center; padding: 40px 16px; }

/* Alternating project rows: the whole card and image animate together. */
.dmw-cs-project { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: 20px; margin-inline: -20px; border-radius: 12px; transition: background-color .4s ease, box-shadow .4s ease; }
.dmw-cs-project:hover, .dmw-cs-project:focus-within { background-color: #031c40; box-shadow: 0 8px 30px #00000010; }
.dmw-cs-project__media { display: block; border-radius: 8px; overflow: hidden; min-width: 0; background: #0b223d; aspect-ratio: 620 / 448; }
.dmw-cs-project__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.22, 1, .36, 1); }
.dmw-cs-project:hover .dmw-cs-project__media img, .dmw-cs-project:focus-within .dmw-cs-project__media img { transform: scale(1.035); }
.dmw-cs-project--reverse .dmw-cs-project__media { order: 2; }
.dmw-cs-project__content { min-width: 0; padding: 20px 0; }
.dmw-cs-logo { margin: 0 0 34px; color: #fff; font-size: 36px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.dmw-cs-logo img { display: block; width: auto; max-width: min(100%, 280px); height: 58px; object-fit: contain; object-position: left center; }
.dmw-cs-desc { margin: 0 0 38px; max-width: 480px; color: #c0cada; font-size: 16px; font-weight: 400; line-height: 1.55; white-space: pre-line; }
.dmw-cs-stats { display: flex; margin: 0 0 36px; padding: 0; gap: 0; }
.dmw-cs-stats > div { flex: 1 1 0; min-width: 0; padding: 0 24px; border-left: 1px solid #64768c; }
.dmw-cs-stats > div:first-child { padding-left: 0; border-left: 0; }
.dmw-cs-stats > div:last-child { padding-right: 0; }
.dmw-cs-stats dt { font-size: 25px; font-weight: 600; color: #fff; line-height: 1.2; margin-bottom: 10px; overflow-wrap: anywhere; }
.dmw-cs-stats dd { font-size: 13px; line-height: 1.5; color: #c0cada; margin: 0; overflow-wrap: anywhere; }
.dmw-cs-btn { display: inline-flex; align-items: center; justify-content: center; gap: 24px; padding: 16px 28px; background: #0666ff; color: #fff; border: 1px solid #0666ff; border-radius: 50px; font: inherit; font-size: 14px; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background-color .25s ease, transform .25s ease; }
.dmw-cs-btn > span:last-child { transition: transform .25s ease; }
.dmw-cs-btn:hover { color: #fff; background: #1382f9; }
.dmw-cs-btn:hover > span:last-child { transform: translate(3px, -2px); }
.dmw-cs-btn:disabled { opacity: .6; cursor: wait; }
.dmw-cs :is(a, button):focus-visible { outline: 2px solid #41e2ff; outline-offset: 5px; }

/* Featured banner: description on the left, up to three stats on the right. */
.dmw-cs-project--banner { display: block; position: relative; margin: 0; padding: 0; overflow: hidden; border-radius: 10px; min-height: 490px; }
.dmw-cs-project--banner .dmw-cs-project__media { position: absolute; inset: 0; aspect-ratio: auto; border-radius: inherit; }
.dmw-cs-project--banner .dmw-cs-project__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 12%, #0003 44%, #000e 100%); pointer-events: none; }
.dmw-cs-project--banner .dmw-cs-project__content { position: relative; pointer-events: none; min-height: 490px; padding: 280px 60px 40px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: end; }
.dmw-cs-project--banner .dmw-cs-project__intro { min-width: 0; }
.dmw-cs-project--banner .dmw-cs-logo { margin-bottom: 24px; font-size: 30px; }
.dmw-cs-project--banner .dmw-cs-logo img { height: 48px; }
.dmw-cs-project--banner .dmw-cs-desc, .dmw-cs-project--banner .dmw-cs-stats { margin: 0; color: #fff; }
.dmw-cs-project--banner .dmw-cs-stats dt { font-size: 23px; }
.dmw-cs-project--banner .dmw-cs-stats dd { color: #e2e7ee; font-size: 12px; }
.dmw-cs-project--banner .dmw-cs-btn { pointer-events: auto; grid-column: 1 / -1; justify-self: start; padding: 10px 20px; }

/* Inline and final CTAs reuse the page's ACF content. */
.dmw-cs-cta { text-align: center; padding: 48px; border: 2px solid transparent; border-radius: 24px; background: linear-gradient(115deg, #06182f, #082c62) padding-box, linear-gradient(130deg, #20cfbd, #7798ff) border-box; background-size: cover; }
.dmw-cs-cta h2 { font-size: 28px; line-height: 1.5; color: #fff; max-width: 760px; margin: 0 auto 30px; text-wrap: balance; font-weight: 500; }
.dmw-cs-cta p { color: #c0cada; line-height: 1.5; margin: 0 auto 25px; max-width: 760px; }
.dmw-cs-cta__logos { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 32px 48px; margin: 30px 0; }
.dmw-cs-cta__logos img { width: auto; max-width: 170px; height: 38px; object-fit: contain; }
.dmw-cs-more { display: flex; justify-content: center; margin: 60px 0 0; }
.dmw-cs-leaders { margin-top: 100px; }
.dmw-cs-leaders > h2 { font-size: 44px; line-height: 1.2; max-width: 700px; color: #fff; margin: 0 0 48px; font-weight: 600; text-wrap: balance; }
.dmw-cs-leaders__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.dmw-cs-leader { display: flex; flex-direction: column; justify-content: space-between; min-height: 330px; padding: 36px 24px; background: #081426; color: #fff; text-decoration: none; border-radius: 8px; transition: background-color .35s ease; }
.dmw-cs-leader__head { display: flex; justify-content: space-between; align-items: start; gap: 15px; margin-bottom: 90px; }
.dmw-cs-leader .dmw-cs-logo { margin: 0; font-size: 28px; }
.dmw-cs-leader .dmw-cs-logo img { height: 56px; max-width: 220px; width: 100%; }
.dmw-cs-leader__more { opacity: 0; transform: translate(-8px, 8px); transition: opacity .3s ease, transform .3s ease; }
.dmw-cs-leader .dmw-cs-stats { margin: 0; }
.dmw-cs-leader .dmw-cs-stats dt { color: #ff8c83; font-size: 30px; transition: color .3s ease; }
.dmw-cs-leader .dmw-cs-stats dd { font-size: 12px; }
.dmw-cs-leader:hover, .dmw-cs-leader:focus-visible { background: #1163fb; }
.dmw-cs-leader:hover .dmw-cs-stats dt, .dmw-cs-leader:focus-visible .dmw-cs-stats dt { color: #fff; }
.dmw-cs-leader:hover .dmw-cs-leader__more, .dmw-cs-leader:focus-visible .dmw-cs-leader__more { opacity: 1; transform: none; }
.dmw-cs-expertise { margin-top: 100px; }
.dmw-cs-expertise strong, .dmw-cs-expertise em { color: #0ac9da; font-style: normal; }
.dmw-cs-closing { position: relative; padding: 160px 140px 170px; margin-top: 30px; overflow: hidden; text-align: center; }
.dmw-cs-closing .dmw-cs-end-copy { position: relative; z-index: 1; max-width: 620px; margin: auto; }
.dmw-cs-closing h2 { font-size: 28px; line-height: 1.55; color: #fff; font-weight: 400; margin: 0 0 55px; text-wrap: balance; }
.dmw-cs-bubble { position: absolute; display: grid; place-items: center; border: 1px solid #ffffff40; border-radius: 50%; width: 100px; height: 100px; padding: 15px; animation: dmw-cs-float 6s ease-in-out infinite alternate; pointer-events: none; }
.dmw-cs-bubble img { width: 100%; max-height: 100%; object-fit: contain; }
.dmw-cs-bubble--0 { top: 50px; left: 2%; }
.dmw-cs-bubble--1 { top: 250px; left: 3%; width: 48px; height: 48px; padding: 10px; }
.dmw-cs-bubble--2 { bottom: 80px; left: 14%; width: 80px; height: 80px; animation-delay: -2s; }
.dmw-cs-bubble--3 { bottom: 30px; left: 28%; width: 44px; height: 44px; padding: 10px; }
.dmw-cs-bubble--4 { top: 85px; right: 10%; width: 48px; height: 48px; padding: 10px; }
.dmw-cs-bubble--5 { top: 220px; right: 2%; }
.dmw-cs-bubble--6 { bottom: 50px; right: 8%; width: 80px; height: 80px; animation-delay: -3s; }
.dmw-cs-bubble--7 { top: 40px; right: 30%; width: 44px; height: 44px; padding: 10px; }
@keyframes dmw-cs-float { to { transform: translateY(-12px); } }
.dmw-cs-reveal { animation: dmw-cs-enter .6s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes dmw-cs-enter { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* Desktop / small laptop. */
@media only screen and (min-width: 1200px) and (max-width: 1366px) {
    .dmw-cs-project--banner .dmw-cs-project__content { padding-inline: 40px; }
}
@media only screen and (min-width: 993px) and (max-width: 1199px) {
    .dmw-cs-project { gap: 30px; }
    .dmw-cs-logo { font-size: 30px; }
    .dmw-cs-project--banner .dmw-cs-project__content { padding-inline: 30px; }
    .dmw-cs-leader { padding: 28px 22px; }
    .dmw-cs-stats > div { padding-inline: 14px; }
}
/* Tablet: keep project columns, give all banner content its own row. */
@media only screen and (min-width: 768px) and (max-width: 992px) {
    .dmw-cs { padding-top: 65px; }
    .dmw-cs__head { margin-bottom: 55px; }
    .dmw-cs__desc { font-size: 18px; }
    .dmw-cs-featured { gap: 55px; }
    .dmw-cs-project { gap: 26px; padding: 12px; margin-inline: -12px; }
    .dmw-cs-logo { font-size: 26px; margin-bottom: 24px; }
    .dmw-cs-logo img { max-width: 220px; height: 46px; }
    .dmw-cs-desc { font-size: 15px; margin-bottom: 26px; }
    .dmw-cs-stats { margin-bottom: 25px; }
    .dmw-cs-stats > div { padding-inline: 10px; }
    .dmw-cs-stats dt { font-size: 22px; }
    .dmw-cs-stats dd { font-size: 12px; }
    .dmw-cs-project--banner { margin: 0; padding: 0; }
    .dmw-cs-project--banner .dmw-cs-project__content { grid-template-columns: 1fr; padding: 240px 32px 32px; gap: 25px; }
    .dmw-cs-project--banner .dmw-cs-desc { max-width: 100%; }
    .dmw-cs-cta { padding: 40px 28px; }
    .dmw-cs-leaders__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dmw-cs-leaders > h2 { font-size: 36px; }
    .dmw-cs-closing { padding: 140px 95px; }
    .dmw-cs-closing h2 { font-size: 25px; }
}
/* Mobile: image first, content below; no cropping from fixed content heights. */
@media only screen and (max-width: 767px) {
    .dmw-cs { padding-top: 50px; }
    .dmw-cs__head { padding: 0; margin-bottom: 45px; }
    .dmw-cs__eyebrow { font-size: 15px; margin-bottom: 16px; }
    .dmw-cs__heading { font-size: clamp(28px, 7.6vw, 42px); }
    .dmw-cs__desc { font-size: 16px; }
    .dmw-cs-filters { margin-bottom: 35px; }
    .dmw-cs-tabs { gap: 28px; margin-bottom: 24px; }
    .dmw-cs-tab { font-size: 18px; }
    .dmw-cs-pills { gap: 10px; }
    .dmw-cs-pill { font-size: 12px; padding: 8px 10px; }
    .dmw-cs-featured { gap: 45px; }
    .dmw-cs-project { display: flex; flex-direction: column; gap: 0; align-items: stretch; padding: 0; margin: 0; }
    .dmw-cs-project--reverse .dmw-cs-project__media { order: 0; }
    .dmw-cs-project__content { padding: 28px 0 0; }
    .dmw-cs-logo { font-size: 28px; margin-bottom: 24px; }
    .dmw-cs-logo img { max-width: 230px; height: 48px; }
    .dmw-cs-desc { max-width: none; font-size: 15px; margin-bottom: 28px; }
    .dmw-cs-stats > div { padding-inline: 12px; }
    .dmw-cs-stats dt { font-size: 23px; }
    .dmw-cs-stats dd { font-size: 12px; }
    .dmw-cs-btn { font-size: 13px; padding: 14px 22px; gap: 20px; }
    .dmw-cs-project--banner { min-height: 0; }
    .dmw-cs-project--banner .dmw-cs-project__media { position: relative; aspect-ratio: 1.5; }
    .dmw-cs-project--banner .dmw-cs-project__media::after { display: none; }
    .dmw-cs-project--banner .dmw-cs-project__content { display: grid; grid-template-columns: 1fr; gap: 25px; min-height: 0; padding: 28px 0 0; }
    .dmw-cs-project--banner .dmw-cs-desc { max-width: none; }
    .dmw-cs-project--banner .dmw-cs-stats dt { font-size: 23px; }
    .dmw-cs-project--banner .dmw-cs-logo img { height: 48px; }
    .dmw-cs-project--banner .dmw-cs-btn { padding: 14px 22px; }
    .dmw-cs-cta { padding: 32px 20px; border-radius: 20px; }
    .dmw-cs-cta h2 { font-size: 22px; margin-bottom: 25px; }
    .dmw-cs-cta__logos { gap: 24px; }
    .dmw-cs-cta__logos img { max-width: 120px; height: 28px; }
    .dmw-cs-more { margin-top: 40px; }
    .dmw-cs-leaders { margin-top: 60px; }
    .dmw-cs-leaders > h2 { font-size: 30px; margin-bottom: 30px; }
    .dmw-cs-leaders__grid { grid-template-columns: 1fr; gap: 14px; }
    .dmw-cs-leader { min-height: 240px; padding: 28px; }
    .dmw-cs-leader__head { margin-bottom: 55px; }
    .dmw-cs-leader .dmw-cs-stats dt { font-size: 28px; }
    .dmw-cs-expertise { margin-top: 60px; }
    .dmw-cs-closing { padding: 130px 20px 150px; margin-top: 20px; }
    .dmw-cs-closing h2 { font-size: 22px; margin-bottom: 30px; }
    .dmw-cs-bubble { width: 64px; height: 64px; padding: 12px; }
    .dmw-cs-bubble--0 { top: 20px; left: 0; }
    .dmw-cs-bubble--1 { top: 35px; left: 42%; width: 38px; height: 38px; }
    .dmw-cs-bubble--2 { bottom: 30px; left: 7%; }
    .dmw-cs-bubble--3 { bottom: 10px; left: 40%; width: 38px; height: 38px; }
    .dmw-cs-bubble--4 { top: 35px; right: 0; }
    .dmw-cs-bubble--5 { top: auto; bottom: 30px; right: 0; }
    .dmw-cs-bubble--6, .dmw-cs-bubble--7 { display: none; }
}
@media only screen and (min-width: 480px) and (max-width: 767px) {
    .dmw-cs-leaders__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dmw-cs-leader { padding: 22px 16px; }
    .dmw-cs-leader .dmw-cs-logo img { max-width: 160px; }
    .dmw-cs-leader .dmw-cs-stats dt { font-size: 23px; }
    .dmw-cs-leader .dmw-cs-stats dd { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
    .dmw-cs *, .dmw-cs *::before, .dmw-cs *::after { animation: none !important; transition: none !important; }
}
