/* Case studies only: archive cards (/case-studies/) and the single case-study
   template. Linked from those pages alone, so no other page downloads it. */

/* ---- hero: the result leads, as a before → after scoreboard ---- */
.cs-hero { background:
    radial-gradient(760px 520px at 92% 0%, rgba(53,223,212,.34), transparent 60%),
    radial-gradient(700px 560px at 0% 100%, rgba(139,63,240,.42), transparent 58%),
    linear-gradient(135deg, #0b1630, #13224a 60%, #0e1b33);
  padding: 58px 0 96px; }
.cs-hero-grid { display: grid; grid-template-columns: 1fr; gap: 30px; align-items: center; }
.cs-hero h1 { max-width: 20ch; text-wrap: balance; }
.cs-hero .lead { max-width: 58ch; }
.cs-hero .post-meta { margin-top: 16px; color: rgba(255,255,255,.72); font-size: .86rem; }
.cs-scorecard { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); border-radius: 22px;
  padding: 26px 28px; backdrop-filter: blur(6px); justify-self: start; min-width: min(100%, 300px); }
.cs-score { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 14px; font-family: var(--font-display);
  font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.cs-from { font-size: clamp(1.5rem, 3vw, 2.1rem); color: rgba(255,255,255,.55); text-decoration: line-through;
  text-decoration-thickness: 2px; text-decoration-color: rgba(234,67,53,.85); }
.cs-arrow { font-size: clamp(1.3rem, 2.4vw, 1.8rem); color: var(--teal); }
.cs-to { font-size: clamp(2.8rem, 6.4vw, 4.4rem); color: #fff;
  background: linear-gradient(100deg, #fff 20%, #8ff3ea); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.cs-score-label { margin-top: 12px; font-size: .78rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: rgba(255,255,255,.78); }

/* ---- snapshot strip, lifted over the hero edge ---- */
.cs-facts-wrap { margin-top: -54px; position: relative; z-index: 2; }
.cs-facts { display: grid; grid-template-columns: repeat(2, 1fr); background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.cs-facts > div { padding: 18px 20px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); min-width: 0; }
.cs-facts dt, .cs-glance dt { font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.cs-facts dd { font-family: var(--font-display); font-weight: 700; font-size: .98rem; line-height: 1.3; overflow-wrap: anywhere; }
.cs-facts-svc { grid-column: 1 / -1; border-bottom: 0 !important; }
.cs-facts-svc ul, .cs-svc-list { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; margin: 2px 0 0; padding: 0; }
.cs-facts-svc li a, .cs-facts-svc li span, .cs-svc-list li a, .cs-svc-list li span {
  display: inline-block; font-family: var(--font-body); font-size: .8rem; font-weight: 600; padding: 5px 11px; border-radius: 999px;
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.cs-facts-svc li a:hover, .cs-svc-list li a:hover { border-color: var(--brand); color: var(--brand); }

/* ---- metrics ---- */
.cs-metrics-sec { padding-bottom: 30px; }
.cs-metrics { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; margin: 26px 0 0; padding: 0;
  border-top: 2px solid var(--ink); }
.cs-metrics li { padding: 22px 18px 22px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cs-metrics strong { font-family: var(--font-display); font-size: clamp(1.9rem, 4.2vw, 2.9rem); font-weight: 800; line-height: 1.05;
  color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.02em; overflow-wrap: anywhere; }
.cs-m-label { font-weight: 700; font-size: .95rem; }
.cs-m-note { color: var(--muted); font-size: .84rem; }
.cs-source { margin-top: 18px; font-size: .88rem; color: var(--muted); display: flex; gap: 9px; align-items: baseline; max-width: 78ch; }
.cs-source i { color: var(--g-green); }

/* ---- before / after ---- */
.cs-compare-sec { background: var(--bg-soft); }
.cs-compare { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 24px; }
.cs-shot { position: relative; margin: 0; background: #fff; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.cs-shot img { display: block; width: 100%; height: auto; }
.cs-tag { position: absolute; top: 12px; left: 12px; z-index: 1; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px; color: #fff; background: #b3261e; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.cs-after .cs-tag { background: #1e7e34; }
.cs-after { outline: 3px solid rgba(52,168,83,.35); outline-offset: 0; }
.cs-caption { margin-top: 14px; color: var(--muted); font-size: .92rem; max-width: 78ch; }

/* ---- story + aside ---- */
.cs-story { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: start; }
.cs-prose { max-width: 70ch; }
.cs-prose h2 { scroll-margin-top: 90px; }
.cs-steps { list-style: none; counter-reset: csstep; margin: 18px 0 8px; padding: 0; position: relative; }
.cs-steps::before { content: ""; position: absolute; left: 17px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.cs-steps li { counter-increment: csstep; position: relative; padding: 0 0 22px 56px; }
.cs-steps li::before { content: counter(csstep); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: .95rem;
  background: var(--ink); color: #fff; box-shadow: 0 0 0 5px #fff; }
.cs-steps h3 { font-size: 1.06rem; margin: 5px 0 4px; }
.cs-steps p { margin: 0; }
.cs-quote { margin: 30px 0; padding: 24px 26px; border-radius: 16px; background: var(--bg-soft); border-left: 4px solid var(--brand); }
.cs-quote p { font-family: var(--font-display); font-size: 1.12rem; font-weight: 600; color: var(--ink); line-height: 1.5; margin: 0; }
.cs-quote footer { margin-top: 10px; font-size: .86rem; color: var(--muted); font-weight: 600; }
.cs-aside { display: grid; gap: 18px; }
.cs-glance dl { display: grid; gap: 12px; }
.cs-glance dd { font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.cs-site { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-weight: 700; font-size: .9rem; }
.cs-site i { font-size: .72rem; margin-left: 4px; }

/* ---- evidence ---- */
.cs-proof-sec { background: linear-gradient(180deg, #fff, var(--bg-soft)); }
.cs-video { max-width: 760px; margin: 26px 0 8px; }
.cs-proofs { display: grid; grid-template-columns: 1fr; gap: 22px; margin-top: 26px; }
.cs-proof { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.cs-proof img { display: block; width: 100%; height: auto; }
.cs-proof figcaption { padding: 14px 18px; font-size: .9rem; color: var(--muted); border-top: 1px solid var(--line); }

/* ---- archive + related cards ---- */
.case-grid2 { display: grid; grid-template-columns: 1fr; gap: 24px; }
.case-card2 { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; }
.case-card2:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.cc-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.cc-media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.cc-media-score { display: flex; align-items: center; justify-content: center; text-decoration: none;
  background: radial-gradient(420px 260px at 90% 0%, rgba(53,223,212,.3), transparent 60%), linear-gradient(135deg, #0b1630, #13224a); }
.cc-media-score .cs-scorecard { background: none; border: 0; padding: 0; min-width: 0; backdrop-filter: none; text-align: center; }
.cc-media-score .cs-score { justify-content: center; }
.cc-media-score .cs-to { font-size: clamp(2.2rem, 5vw, 3rem); }
.cc-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cc-where { font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.cc-score .cs-score { gap: 6px 10px; }
.cc-score .cs-from { font-size: 1.15rem; color: #94a3b8; }
.cc-score .cs-arrow { font-size: 1.05rem; color: var(--g-green); }
.cc-score .cs-to { font-size: 2.3rem; background: none; -webkit-text-fill-color: currentColor; color: var(--ink); }
.cc-score .cs-score-label { margin-top: 5px; color: var(--muted); font-size: .68rem; }
.case-card2 h2.cc-title { font-size: 1.12rem; line-height: 1.35; margin: 4px 0 0; letter-spacing: 0; }
.cc-title a { color: inherit; text-decoration: none; }
.cc-title a:hover { color: var(--brand); }
.cc-excerpt { color: var(--muted); font-size: .92rem; }
.cc-foot { margin-top: auto; padding-top: 12px; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: .86rem; font-weight: 700; }
.cc-foot span { color: var(--muted); font-weight: 600; }

@media (min-width: 640px) {
  .cs-facts { grid-template-columns: repeat(4, 1fr); }
  .cs-metrics { grid-template-columns: repeat(2, 1fr); }
  .cs-metrics li { padding-right: 26px; }
  .cs-proofs { grid-template-columns: repeat(2, 1fr); }
  .case-grid2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .cs-hero-grid { grid-template-columns: minmax(0, 1.5fr) minmax(280px, .8fr); gap: 48px; }
  .cs-scorecard { justify-self: end; }
  .cs-compare { grid-template-columns: 1fr 1fr; }
  .cs-metrics.cs-m3 { grid-template-columns: repeat(3, 1fr); }
  .cs-metrics.cs-m4 { grid-template-columns: repeat(4, 1fr); }
  .cs-story { grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; }
  .cs-aside { position: sticky; top: 96px; }
  .case-grid2 { grid-template-columns: repeat(3, 1fr); }
  .case-grid2.cg-pairs { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .case-card2 { transition: none; } .case-card2:hover { transform: none; } }
