/* ==========================================================================
   Case studies — /case-studies and /case-study-*.html
   Builds on css/site.css (variables, nav, footer, .section-*, .btn, .cta).
   Everything here is prefixed .cs- to stay out of site.css's way.
   ========================================================================== */

/* ---------- page hero (shared) ---------- */
.cs-hero { padding: 72px 0 40px; }
.cs-crumb { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 22px; }
.cs-crumb a { color: var(--muted); text-decoration: none; }
.cs-crumb a:hover { color: var(--ink-2); }
.cs-hero .hero-tag { margin-bottom: 20px; }
.cs-hero h1.hero-h1 { max-width: 15ch; }
.cs-hero .hero-lede { max-width: 58ch; }
.cs-hero .hero-lede strong { color: var(--ink-2); font-weight: 600; }

/* ---------- snapshot strip ---------- */
.cs-snap {
  margin: 40px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.cs-snap > div { padding: 18px 18px 18px 0; margin-right: 18px; border-right: 1px solid var(--line); }
.cs-snap > div:last-child { border-right: 0; margin-right: 0; }
.cs-snap dt { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cs-snap dd { margin: 6px 0 0; font-weight: 600; font-size: 15.5px; line-height: 1.35; color: var(--ink-2); }
@media (max-width: 900px) { .cs-snap { grid-template-columns: repeat(3, 1fr); } .cs-snap > div:nth-child(3n) { border-right: 0; } }
@media (max-width: 560px) { .cs-snap { grid-template-columns: repeat(2, 1fr); } .cs-snap > div:nth-child(3n) { border-right: 1px solid var(--line); } .cs-snap > div:nth-child(2n) { border-right: 0; } }

/* ---------- article layout ---------- */
.cs-article { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; padding: 56px 0 24px; }
@media (max-width: 960px) { .cs-article { grid-template-columns: 1fr; gap: 40px; } }
.cs-prose { max-width: 66ch; }
.cs-prose h2 { font-family: 'Inter', sans-serif; font-weight: 700; letter-spacing: -0.03em; font-size: clamp(1.6rem, 2.6vw, 2.1rem); line-height: 1.1; margin: 56px 0 16px; color: var(--ink-2); }
.cs-prose h2:first-of-type { margin-top: 0; }
.cs-prose p { margin: 0 0 18px; color: var(--ink-70); line-height: 1.6; }
.cs-prose p strong { color: var(--ink-2); font-weight: 600; }
.cs-kicker { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--amber); margin: 0 0 8px; }

/* ---------- distributor-format figure ---------- */
.cs-figure { margin: 28px 0; }
.cs-figure figcaption { margin-top: 10px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.cs-fmt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 700px) { .cs-fmt-grid { grid-template-columns: 1fr; } }
.cs-fmt { border: 1px solid var(--line); border-radius: var(--radius); background: #FAF8F4; overflow: hidden; font-size: 12.5px; }
.cs-fmt-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); font-weight: 600; color: var(--ink-70); font-size: 12px; }
.cs-fmt-type { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; color: var(--amber); background: rgba(180,83,9,.10); padding: 2px 6px; border-radius: 4px; }
.cs-fmt table { width: 100%; border-collapse: collapse; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11.5px; }
.cs-fmt th { text-align: left; font-weight: 600; color: var(--muted); padding: 6px 10px; border-bottom: 1px solid var(--line); background: #fff; }
.cs-fmt td { padding: 6px 10px; border-bottom: 1px solid var(--line); color: var(--ink-70); vertical-align: top; }
.cs-fmt td:last-child, .cs-fmt th:last-child { text-align: right; width: 44px; font-variant-numeric: tabular-nums; }
.cs-fmt tr:last-child td { border-bottom: 0; }
.cs-fmt .c1 td { background: rgba(234,179,8,.22); }
.cs-fmt .c2 td { background: rgba(59,130,246,.18); }
.cs-fmt .c3 td { background: rgba(239,68,68,.18); }
.cs-fmt-note { padding: 8px 10px; border-top: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--amber); }

/* ---------- screenshots ---------- */
.cs-shot { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); background: #111; box-shadow: var(--shadow-card); }

/* ---------- findings list ---------- */
.cs-findings { list-style: none; padding: 0; margin: 24px 0 8px; border-top: 1px solid var(--line); }
.cs-findings li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.cs-findings .ic { width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; background: rgba(180,83,9,.10); color: var(--amber); }
.cs-findings .ic svg { width: 20px; height: 20px; }
.cs-findings h3 { margin: 0 0 4px; font-size: 17px; font-weight: 600; color: var(--ink-2); }
.cs-findings p { margin: 0; font-size: 15.5px; color: var(--ink-55); }

/* ---------- decision callout ---------- */
.cs-decision { margin: 32px 0 8px; background: #FAF8F4; border: 1px solid var(--line); border-radius: 10px; padding: 26px 28px; position: relative; }
.cs-decision::before { content: ""; position: absolute; left: 0; top: 22px; bottom: 22px; width: 3px; background: var(--green); border-radius: 3px; }
.cs-decision .cs-kicker { color: var(--green); }
.cs-decision p { font-family: 'Fraunces', serif; font-size: clamp(20px, 2vw, 24px); line-height: 1.35; color: var(--ink-2); margin: 0; font-weight: 600; letter-spacing: -.01em; }
.cs-decision small { display: block; margin-top: 12px; font-size: 14px; color: var(--muted); font-family: 'Inter', sans-serif; font-weight: 400; }
.cs-note { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 40px; }

/* ---------- sidebar ---------- */
.cs-aside { position: sticky; top: 92px; align-self: start; display: grid; gap: 22px; }
@media (max-width: 960px) { .cs-aside { position: static; } }
.cs-card { border: 1px solid var(--line); background: #FAF8F4; border-radius: 10px; padding: 22px; box-shadow: var(--shadow-card); }
.cs-card.photo { padding: 0; overflow: hidden; }
.cs-card.photo img { display: block; width: 100%; height: auto; aspect-ratio: 16/10; object-fit: cover; }
.cs-card h4 { margin: 0 0 14px; font-size: 11.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.cs-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 15px; }
.cs-card li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-70); }
.cs-card li::before { content: ""; flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); margin-top: 9px; }
.cs-card p { margin: 0; font-size: 15px; color: var(--ink-70); }
.cs-card .btn { width: 100%; justify-content: center; margin-top: 16px; }

/* ---------- gallery ---------- */
.cs-gallery { padding: 24px 0 96px; }
.cs-gallery .section-head { margin-bottom: 28px; }
.cs-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .cs-grid3 { grid-template-columns: 1fr; } }
.cs-grid3 figure { margin: 0; }
.cs-grid3 figcaption { margin-top: 10px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.cs-grid3 figcaption b { color: var(--ink-2); font-weight: 600; }

/* ---------- index: featured card ---------- */
.cs-featured { padding: 8px 0 56px; }
.cs-feat {
  display: grid; grid-template-columns: 1.05fr 1fr;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: #FAF8F4; text-decoration: none; color: inherit;
  box-shadow: var(--shadow-card); transition: box-shadow .2s, transform .2s;
}
.cs-feat:hover { box-shadow: var(--shadow-float); transform: translateY(-2px); }
.cs-feat .media { background: #EFEAE0; }
.cs-feat .media img { display: block; width: 100%; height: 100%; min-height: 280px; object-fit: cover; }
.cs-feat .copy { padding: 36px; display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 860px) { .cs-feat { grid-template-columns: 1fr; } .cs-feat .copy { padding: 26px 22px; } }
.cs-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.cs-tag { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; background: rgba(180,83,9,.10); color: var(--amber); }
.cs-tag.first { background: rgba(79,127,74,.10); color: var(--green); }
.cs-feat h2 { font-family: 'Inter', sans-serif; font-weight: 700; letter-spacing: -0.03em; font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.1; margin: 4px 0 0; color: var(--ink-2); }
.cs-feat p { margin: 0; color: var(--ink-70); font-size: 16px; line-height: 1.55; }
.cs-feat .meta { display: grid; grid-template-columns: repeat(3, auto); gap: 22px; justify-content: start; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.cs-feat .meta dt { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cs-feat .meta dd { margin: 3px 0 0; font-weight: 600; font-size: 15px; color: var(--ink-2); }
@media (max-width: 500px) { .cs-feat .meta { grid-template-columns: 1fr 1fr; } }
.cs-feat .read { margin-top: auto; padding-top: 14px; font-weight: 600; font-size: 15px; color: var(--ink-2); display: inline-flex; gap: 8px; align-items: center; }
.cs-feat .read svg { width: 16px; height: 16px; transition: transform .15s; }
.cs-feat:hover .read svg { transform: translateX(3px); }

/* ---------- index: themes strip ---------- */
.cs-themes { padding: 0 0 96px; }
.cs-themes h3 { font-size: 11.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px; }
.cs-themes .row { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
@media (max-width: 900px) { .cs-themes .row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .cs-themes .row { grid-template-columns: 1fr; } }
.cs-themes .row > div { padding: 22px 22px 22px 0; border-bottom: 1px solid var(--line); }
.cs-themes h4 { margin: 0 0 6px; font-size: 17px; font-weight: 600; letter-spacing: -.01em; color: var(--ink-2); }
.cs-themes p { margin: 0; font-size: 15px; color: var(--ink-55); }
.cs-themes a { font-size: 14px; font-weight: 600; text-decoration: none; color: var(--amber); display: inline-block; margin-top: 8px; }
.cs-themes a:hover { color: var(--amber-2); }

/* ---------- homepage: customer story card ---------- */
#customer-story .cs-feat { margin-top: 0; }

/* ---------- homepage: proof line under the hero trust row ---------- */
.hero-proof { margin: 18px 0 0; font-size: 14.5px; }
.hero-proof a { color: var(--amber); font-weight: 600; text-decoration: none; }
.hero-proof a:hover { color: var(--amber-2); }
