/* Case studies: listing (page-templates/case-studies.php) and single (single-case_study.php) */
.ycs-page{--ycs-ink:var(--yu-ink,#0F172A);--ycs-muted:var(--yu-muted,#64748B);--ycs-blue:var(--yu-blue,#2563EB);--ycs-line:var(--yu-line,rgba(48,104,232,.14))}
.ycs-page .yu-section{padding-block:0}
.ycs-page .yu-content-hero{padding-top:142px;padding-bottom:40px}
.ycs-page .yu-section + .yu-section{border-top:0}

.ycs-lead{max-width:680px;margin:20px 0 0;color:var(--ycs-muted);font-size:clamp(16px,1.6vw,19px);line-height:1.6}

/* Client mark and tags (shared by cards and the single hero) */
.ycs-card__head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px 24px;margin-top:22px}
.ycs-client{display:flex;align-items:center;gap:16px;min-width:0}
.ycs-client__logo{display:flex;align-items:center;justify-content:center;width:112px;height:64px;padding:8px 12px;border:1px solid var(--ycs-line);border-radius:14px;background:#fff;flex:0 0 auto}
.ycs-client__logo:empty{display:none}
.ycs-logo{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain}
.ycs-client__name{font-size:18px;font-weight:800;color:var(--ycs-ink)}
.ycs-tags{display:flex;flex-wrap:wrap;gap:8px;margin:0;padding:0;list-style:none}
.ycs-tags li{padding:6px 14px;border-radius:999px;background:rgba(37,99,235,.08);color:var(--ycs-blue);font-size:12px;font-weight:800;letter-spacing:.02em}

/* Listing grid */
.ycs-listing{padding-block:28px 12px !important}
.ycs-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
.ycs-tile{position:relative;display:flex;flex-direction:column;gap:16px;padding:28px;border:1px solid var(--ycs-line);border-radius:24px;background:linear-gradient(135deg,rgba(255,255,255,.94),rgba(242,247,255,.8));box-shadow:0 14px 40px rgba(20,36,70,.07);transition:transform .25s ease,box-shadow .25s ease,border-color .25s ease}
.ycs-tile:hover,.ycs-tile:focus-within{transform:translateY(-4px);border-color:rgba(37,99,235,.3);box-shadow:0 22px 54px rgba(20,36,70,.12)}
.ycs-tile__head{display:flex;align-items:center;gap:14px;min-width:0}
.ycs-tile .ycs-client__logo{width:92px;height:54px}
.ycs-tile__title{margin:0;font-size:clamp(20px,1.9vw,24px);line-height:1.2;letter-spacing:-.01em}
.ycs-tile__title a{color:var(--ycs-ink);text-decoration:none}
.ycs-tile__title a::after{content:"";position:absolute;inset:0;border-radius:inherit}
.ycs-tile__summary{margin:0;color:var(--ycs-muted);font-size:15px;line-height:1.6}
.ycs-tile__result{display:flex;align-items:baseline;gap:10px;margin:0;padding-top:16px;border-top:1px solid var(--ycs-line)}
.ycs-tile__result strong{font-size:clamp(26px,2.6vw,32px);line-height:1;font-weight:900;letter-spacing:-.02em;color:var(--ycs-blue)}
.ycs-tile__result span{color:var(--ycs-muted);font-size:13px;font-weight:600;line-height:1.35}
.ycs-tile__more{margin-top:auto;color:var(--ycs-blue);font-size:14px;font-weight:800}

/* Single */
.ycs-single__title{max-width:900px;margin:26px 0 0;font-size:clamp(30px,4.4vw,52px);line-height:1.1;letter-spacing:-.02em;color:var(--ycs-ink)}
.ycs-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:14px;margin:32px 0 0;padding:0;list-style:none}
.ycs-metrics li{display:flex;flex-direction:column;gap:6px;padding:20px 18px;border:1px solid var(--ycs-line);border-radius:18px;background:#fff}
.ycs-metrics strong{font-size:clamp(26px,3vw,36px);line-height:1;font-weight:900;letter-spacing:-.02em;color:var(--ycs-blue)}
.ycs-metrics span{color:var(--ycs-muted);font-size:13px;font-weight:600;line-height:1.35}
.ycs-body{padding-block:28px 40px !important}
.ycs-prose{max-width:780px;margin-inline:auto;color:#475569;font-size:17px;line-height:1.75}
.ycs-prose > *:first-child{margin-top:0}
.ycs-prose h2{margin:2.2em 0 .6em;font-size:clamp(24px,2.6vw,32px);line-height:1.2;letter-spacing:-.01em;color:var(--ycs-ink)}
.ycs-prose h3{margin:1.8em 0 .5em;font-size:21px;line-height:1.25;color:var(--ycs-ink)}
.ycs-prose p{margin:0 0 1.1em}
.ycs-prose ul,.ycs-prose ol{margin:0 0 1.2em;padding-left:1.3em}
.ycs-prose li{margin-bottom:.55em}
.ycs-prose li strong{color:var(--ycs-ink)}
.ycs-prose img{max-width:100%;height:auto;border-radius:16px}
.ycs-prose blockquote{margin:1.6em 0;padding:4px 0 4px 20px;border-left:3px solid var(--ycs-blue);color:var(--ycs-ink)}
.ycs-back{display:inline-block;max-width:780px;margin:28px auto 0;color:var(--ycs-blue);font-weight:800;text-decoration:none}
.ycs-body .yu-container{display:flex;flex-direction:column}
.ycs-back{align-self:center;width:100%}
.ycs-back:hover,.ycs-back:focus-visible{text-decoration:underline}
.ycs-more__title{margin:0 0 22px;font-size:clamp(24px,2.8vw,34px);letter-spacing:-.02em;color:var(--ycs-ink)}

.ycs-cta{padding-block:28px 96px !important}
.ycs-cta__card{padding:clamp(32px,5vw,64px);border-radius:28px;text-align:center;color:#fff;background:radial-gradient(circle at 85% 0%,rgba(80,152,240,.35),transparent 22rem),linear-gradient(135deg,#0F2A66,#2563EB)}
.ycs-cta__card .yu-content-eyebrow{color:#bcd3ff}
.ycs-cta__card h2{margin:0 auto;max-width:720px;font-size:clamp(28px,4vw,46px);line-height:1.12;letter-spacing:-.02em;color:#fff}
.ycs-cta__card p:not(.yu-content-eyebrow){max-width:560px;margin:16px auto 0;color:#dbe7ff;font-size:16px;line-height:1.6}
.ycs-cta__actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:16px 26px;margin-top:28px}
.ycs-cta__link{color:#fff;font-weight:700;text-decoration:none}
.ycs-cta__link:hover,.ycs-cta__link:focus-visible{text-decoration:underline}

@media (max-width:1024px){
  .ycs-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:680px){
  .ycs-grid{grid-template-columns:1fr}
}
@media (max-width:600px){
  .ycs-page .yu-content-hero{padding-top:110px}
  .ycs-tile{padding:22px;border-radius:20px}
  .ycs-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ycs-client__logo{width:92px;height:54px}
  .ycs-prose{font-size:16px}
  .ycs-cta{padding-block:20px 72px !important}
}
@media (prefers-reduced-motion:reduce){
  .ycs-tile{transition:none}
  .ycs-tile:hover,.ycs-tile:focus-within{transform:none}
}
