/* Case studies - the real ones. Built on the site's own tokens (styles.css), so
   light and dark both follow the theme switch. Deliberately plain: no gradients,
   no scroll fade-ins, no monospace labels - the work in the images carries it. */

/* ---------- shared bits ---------- */
.cs-meta{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center;font-size:14px;color:var(--muted);margin:0 0 14px}
.cs-meta b{color:var(--text);font-weight:600}
.cs-dot{width:3px;height:3px;border-radius:50%;background:var(--muted-2);display:inline-block}
.cs-logo{flex:none;width:44px;height:44px;border-radius:10px;display:grid;place-items:center;border:1px solid var(--line-soft);background:#fff;overflow:hidden}
.cs-logo.dark{background:#051824;border-color:#051824}
.cs-logo img{max-width:78%;max-height:70%;object-fit:contain;display:block}
.cs-logo.lg{width:56px;height:56px;border-radius:12px}

/* ---------- index grid ---------- */
.cs-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
@media(max-width:1020px){.cs-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.cs-grid{grid-template-columns:minmax(0,1fr)}}
.cs-card{display:flex;flex-direction:column;border:1px solid var(--line-soft);border-radius:12px;background:var(--surface);overflow:hidden;color:inherit;text-decoration:none;transition:border-color .2s ease,transform .2s ease}
.cs-card:hover{border-color:var(--line);transform:translateY(-2px)}
.cs-card-img{aspect-ratio:4/3;background:var(--bg-2);overflow:hidden}
.cs-card-img img{width:100%;height:100%;object-fit:cover;display:block}
.cs-card-body{display:flex;flex-direction:column;gap:12px;padding:20px 20px 22px;flex:1}
.cs-card-head{display:flex;align-items:center;gap:12px}
.cs-card-head h3{font-size:18px;line-height:1.3;margin:0}
.cs-card-head span{display:block;font-size:13px;color:var(--muted);margin-top:2px}
.cs-card p{font-size:15px;line-height:1.6;color:var(--text-2);margin:0;flex:1}
.cs-card .cs-more{font-size:14px;font-weight:600;color:var(--accent-on-surface,var(--brand))}

/* ---------- client logo strip (home page) ---------- */
.cs-clients{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:12px 14px}
.cs-clients a{display:flex;align-items:center;gap:10px;padding:8px 14px 8px 8px;border:1px solid var(--line-soft);border-radius:10px;font-size:14px;font-weight:500;color:var(--text);text-decoration:none;background:var(--surface)}
.cs-clients a:hover{border-color:var(--line)}
.cs-clients .cs-logo{width:32px;height:32px;border-radius:8px}

/* ---------- detail page ---------- */
.cs-hero-head{display:flex;align-items:center;gap:16px;margin-bottom:6px}
.cs-hero-head h1{margin:0}
.cs-banner{margin:0 0 56px;border-radius:12px;overflow:hidden;border:1px solid var(--line-soft);background:var(--bg-2)}
.cs-banner img{width:100%;height:auto;display:block}
.cs-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:56px;align-items:start}
@media(max-width:960px){.cs-layout{grid-template-columns:minmax(0,1fr);gap:40px}}
.cs-body h2{font-size:22px;line-height:1.3;margin:0 0 12px}
.cs-body > div + div{margin-top:40px}
.cs-body p{font-size:16px;line-height:1.75;color:var(--text-2);margin:0 0 12px;max-width:68ch}
.cs-list{list-style:none;padding:0;margin:0;display:grid;gap:10px;max-width:68ch}
.cs-list li{position:relative;padding-left:26px;font-size:16px;line-height:1.6;color:var(--text-2)}
.cs-list li::before{content:"";position:absolute;left:4px;top:.62em;width:8px;height:8px;border-radius:2px;background:var(--brand)}
.cs-facts{border:1px solid var(--line-soft);border-radius:12px;padding:22px;background:var(--surface);position:sticky;top:96px}
.cs-facts h3{font-size:16px;margin:0 0 6px}
.cs-facts dl{margin:0}
.cs-facts div{display:flex;justify-content:space-between;gap:16px;padding:11px 0;border-bottom:1px solid var(--line-soft);font-size:14px}
.cs-facts div:last-child{border-bottom:0}
.cs-facts dt{color:var(--muted)}
.cs-facts dd{margin:0;text-align:right;font-weight:500;color:var(--text)}
.cs-facts .btn{width:100%;justify-content:center;margin-top:14px}
@media(max-width:960px){.cs-facts{position:static}}

/* the live site, as it is today */
.cs-shots{display:grid;grid-template-columns:minmax(0,1fr) 250px;gap:32px;align-items:end}
@media(max-width:760px){.cs-shots{grid-template-columns:minmax(0,1fr)}}
.cs-shots figure{margin:0}
.cs-shots figcaption{font-size:13px;color:var(--muted);margin-top:10px}
.cs-browser{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--surface)}
.cs-browser-bar{display:flex;align-items:center;gap:6px;height:34px;padding:0 14px;border-bottom:1px solid var(--line-soft);background:var(--bg-2)}
.cs-browser-bar i{width:9px;height:9px;border-radius:50%;background:var(--line);display:block}
.cs-browser-bar span{margin-left:10px;font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cs-browser img,.cs-phone img{width:100%;height:auto;display:block}
.cs-phone{border:8px solid #16181b;border-radius:30px;overflow:hidden;background:#16181b;max-width:250px;margin:0 auto}

/* the live site gets the full width under the text, so the desktop shot is
   readable rather than squeezed beside the details card */
.cs-live{margin-top:64px}
.cs-live h2{font-size:22px;line-height:1.3;margin:0 0 16px}
.cs-live .cs-shots{grid-template-columns:minmax(0,1fr) 280px;align-items:start}
.cs-live .cs-phone{max-width:280px}
@media(max-width:760px){.cs-live .cs-shots{grid-template-columns:minmax(0,1fr)}.cs-live .cs-phone{max-width:240px}}

/* ---------- case page, Devsinc pattern (v3) ---------- */
.cs-hero .page-hero-inner{max-width:900px}
.cs-kicker{font-size:14px;font-weight:600;color:var(--accent-on-surface,var(--brand));margin:0 0 10px}
.cs-hero h1{font-size:clamp(30px,4vw,46px);line-height:1.15;letter-spacing:-.02em;margin:0 0 14px}
.cs-lede{font-size:18px;line-height:1.6;color:var(--text-2);margin:0 0 20px;max-width:64ch}
.cs-tags{display:flex;flex-wrap:wrap;gap:8px}
.cs-tags span{font-size:13px;padding:5px 11px;border:1px solid var(--line);border-radius:6px;color:var(--text-2);background:var(--surface)}
.cs-top{padding-top:48px}
.cs-sub{font-size:16px;margin:20px 0 10px}
.cs-result{margin-top:16px!important;padding:14px 16px;border-left:3px solid var(--brand);background:var(--bg-2);border-radius:0}
.cs-side{display:grid;gap:16px;position:sticky;top:96px}
.cs-side .cs-facts{position:static}
.cs-facts .btn{display:flex;gap:8px;align-items:center}
.cs-share{display:flex;align-items:center;gap:10px;margin-top:16px;font-size:13px;color:var(--muted)}
.cs-share a{display:grid;place-items:center;width:34px;height:34px;border:1px solid var(--line-soft);border-radius:8px;color:var(--text-2)}
.cs-share a:hover{border-color:var(--line);color:var(--text)}
.cs-toc{border:1px solid var(--line-soft);border-radius:12px;padding:18px 22px;background:var(--surface)}
.cs-toc h3{font-size:14px;margin:0 0 8px}
.cs-toc a{display:block;padding:6px 0;font-size:14px;color:var(--text-2);text-decoration:none;border-bottom:1px solid var(--line-soft)}
.cs-toc a:last-child{border-bottom:0}
.cs-toc a:hover{color:var(--accent-on-surface,var(--brand))}
@media(max-width:960px){.cs-side{position:static}.cs-toc{display:none}}
.cs-body [id],.cs-narrow [id],#features{scroll-margin-top:96px}
.cs-band{background:var(--bg-2);border-top:1px solid var(--line-soft);border-bottom:1px solid var(--line-soft)}
.cs-feature{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:48px;align-items:center;margin-top:48px}
.cs-feature.flip figure{order:2}
.cs-feature figure{margin:0;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--surface)}
.cs-feature img{width:100%;height:auto;display:block}
.cs-feature-n{font-size:13px;font-weight:600;color:var(--accent-on-surface,var(--brand))}
.cs-feature h3{font-size:24px;line-height:1.25;margin:6px 0 12px}
.cs-feature p{font-size:16px;line-height:1.7;color:var(--text-2);margin:0}
@media(max-width:860px){.cs-feature{grid-template-columns:minmax(0,1fr);gap:20px;margin-top:36px}.cs-feature.flip figure{order:0}}
.cs-narrow > div + div{margin-top:56px}
.cs-narrow h2{font-size:22px;line-height:1.3;margin:0 0 14px}
.cs-about p{font-size:16px;line-height:1.75;color:var(--text-2);max-width:68ch}
.cs-about .btn{margin:8px 8px 0 0;display:inline-flex;gap:8px;align-items:center}
.cs-more-head{display:flex;justify-content:space-between;align-items:end;gap:16px;flex-wrap:wrap}

/* ---------- screenshots in a macOS browser window (build_case_studies.mac) ----------
   The image keeps its natural shape - nothing is cropped to fit a box. */
.mac{border-radius:12px;overflow:hidden;background:#fff;box-shadow:0 0 0 1px rgba(5,24,36,.10),0 14px 34px rgba(5,24,36,.10)}
.mac-bar{position:relative;display:flex;align-items:center;gap:7px;height:30px;padding:0 12px;background:#ECEEF0;border-bottom:1px solid #DDE1E4}
.mac-bar i{display:block;width:11px;height:11px;border-radius:50%;background:#FF5F57;box-shadow:inset 0 0 0 .5px rgba(0,0,0,.12)}
.mac-bar i:nth-child(2){background:#FEBC2E}
.mac-bar i:nth-child(3){background:#28C840}
.mac-bar span{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);max-width:58%;padding:3px 14px;border-radius:6px;background:#fff;
  font-size:11.5px;line-height:1.3;color:#597282;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mac img{display:block;width:100%;height:auto}
:root[data-theme="dark"] .mac{background:#06202F;box-shadow:0 0 0 1px rgba(143,164,177,.22),0 14px 34px rgba(0,0,0,.35)}
:root[data-theme="dark"] .mac-bar{background:#1A2A34;border-color:#26363F}
:root[data-theme="dark"] .mac-bar span{background:#0E1E28;color:#8FA4B1}
@media (prefers-color-scheme: dark){:root:not([data-theme]) .mac{background:#06202F;box-shadow:0 0 0 1px rgba(143,164,177,.22),0 14px 34px rgba(0,0,0,.35)}
  :root:not([data-theme]) .mac-bar{background:#1A2A34;border-color:#26363F}:root:not([data-theme]) .mac-bar span{background:#0E1E28;color:#8FA4B1}}
/* cards: the browser window sits in the card's top panel, whole */
.cs-card-img{aspect-ratio:auto!important;padding:18px 18px 0;background:var(--bg-2);overflow:hidden}
.cs-card-img .mac{border-radius:10px 10px 0 0;box-shadow:0 0 0 1px rgba(5,24,36,.08),0 -2px 18px rgba(5,24,36,.06)}
.cs-card-img img{height:auto!important;object-fit:initial!important}
.cs-card:hover .cs-card-img .mac{transform:translateY(-3px);transition:transform .3s}
.cs-card-img .mac{transition:transform .3s}
/* features: the frame replaces the old bordered figure */
.cs-feature figure{border:0!important;background:none!important;overflow:visible!important;border-radius:0!important}
.cs-feature .cs-mock{display:block;width:100%;height:auto;border-radius:12px}
.cs-live .mac{max-width:100%}
/* a smaller address pill, so the bar never looks crowded (all browser frames) */
.mac-bar span{font-size:10px;line-height:1.2;padding:2px 10px;border-radius:5px;max-width:44%;letter-spacing:.01em}
.cs-card-img .mac-bar{height:26px}
.cs-card-img .mac-bar span{font-size:9px;padding:1px 8px;max-width:40%}
.cs-card-img .mac-bar i{width:9px;height:9px}
@media (max-width:640px){.mac-bar span{font-size:9px;padding:1px 8px}}
/* logo tiles: the image IS the tile (centred and padded when it was made) */
.cs-logo.cs-logo-t{padding:0;border:0;background:none;overflow:hidden;box-shadow:0 0 0 1px rgba(5,24,36,.08)}
.cs-logo.cs-logo-t img{width:100%;height:100%;max-width:none;max-height:none;object-fit:cover}
