/* Case study pages and the /work/ index. Built on /ds.css tokens and components. */

.cs { padding-bottom: var(--s9); }

/* hero: label, title, lede, facts, buttons, then the cover across the outer guide lines */
.cs-hero { padding-block: 64px var(--s7); }
.cs-hero .eyebrow { display: flex; align-items: center; gap: 10px; }
.cs-disc { display: inline-flex; gap: 5px; }
.cs-hero .title { margin-top: 20px; }
.cs-hero .lede { margin-top: 18px; }
.cs-hero .facts { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); }
.cs-hero .btns { margin-top: 36px; }
.cs-wide { max-width: var(--w-wide); margin: 56px auto 0; }
.cs-cover img { width: 100%; height: auto; }

/* body: text in the reading column, pictures out to the inner guide lines */
.cs-body { padding-top: var(--s5); }
.cs-body .prose > .cs-fig, .cs-body .prose > .cs-embed { margin-top: 40px; }
.cs-body .prose > .cs-fig + .cs-fig { margin-top: 16px; }
.cs-fig { margin: 0; }
.cs-fig .media { width: min(714px, calc(100vw - 32px)); margin-left: 50%; transform: translateX(-50%); }
.prose li .cs-fig { margin-top: 12px; }
.prose li .cs-fig .media { width: 100%; margin-left: 0; transform: none; }
.cs-fig video { display: block; width: 100%; height: auto; }

/* full-page screenshots scroll inside their frame */
.cs-shot { max-height: min(80vh, 760px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.cs-shot-tag { position: sticky; bottom: 12px; left: 0; display: table; margin: -40px 12px 12px auto; padding: 5px 8px; border-radius: 6px; background: rgba(20, 20, 20, 0.78); color: #fff; font-family: var(--dm); font-size: var(--fs-xs); letter-spacing: 0.4px; text-transform: uppercase; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* embedded link: live site, Jitter file, related case study */
.cs-embed { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; text-decoration: none; transition: border-color 0.2s, transform 0.25s var(--ease); }
.cs-embed:hover { border-color: var(--fg); }
.cs-embed-d { font-family: var(--title); font-size: 18px; letter-spacing: -0.3px; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-embed-l { flex: none; display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; letter-spacing: -0.3px; text-transform: uppercase; color: var(--mut); }
.cs-embed-l svg { width: 13px; height: 13px; transition: transform 0.25s var(--ease); }
.cs-embed:hover .cs-embed-l svg { transform: translate(2px, -2px); }

/* next project */
.cs-foot { margin-top: var(--s9); padding-top: var(--s6); border-top: 1px solid var(--line); }
.cs-next { display: grid; grid-template-columns: 1fr; gap: 6px; text-decoration: none; }
.cs-next-n { margin-top: 10px; font-family: var(--title); font-size: var(--fs-xl); line-height: 1.1; letter-spacing: -1.4px; color: var(--fg); }
.cs-next-d { font-size: var(--fs-m); color: var(--mut); }
.cs-next-img { margin-top: 18px; aspect-ratio: 16 / 10; }
.cs-next-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.cs-next:hover .cs-next-img img { transform: scale(1.03); }
.cs-next-go { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-family: var(--mono); font-weight: 600; font-size: 13px; letter-spacing: -0.65px; text-transform: uppercase; color: var(--accent); }
.cs-next-go svg { width: 14px; height: 14px; transition: transform 0.25s var(--ease); }
.cs-next:hover .cs-next-go svg { transform: translateX(3px); }
.cs-all { margin-top: 28px; }

/* /work/ index */
.wi-key { margin-top: 24px; }
.wi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; max-width: var(--w-wide); margin: 16px auto 0; padding-inline: 16px; }
.wi { display: flex; flex-direction: column; gap: 6px; text-decoration: none; }
.wi-img { aspect-ratio: 4 / 3; margin-bottom: 8px; }
.wi-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.wi:hover .wi-img img { transform: scale(1.03); }
.wi-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wi-row b { font-family: var(--title); font-weight: 400; font-size: var(--fs-b); color: var(--fg); }
.wi-row .log-chips { display: flex; align-items: center; gap: 6px; }
.wi-d { font-size: 14px; line-height: 20px; color: var(--mut); }

@media (max-width: 1100px) {
  .wi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-wide { padding-inline: 16px; }
}
@media (max-width: 640px) {
  .cs-hero { padding-top: 40px; }
  .cs-wide { margin-top: 36px; }
  .wi-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .cs-embed { flex-direction: column; align-items: flex-start; gap: 6px; }
}
.prose a.cs-embed, .prose a.cs-embed:hover { text-decoration: none; }
