/* Case-study pages (/work/*). Values ported 1:1 from the approved After 11 template in the Claude Design export.
   Phone layout = max-width 479px. Shares nav + footer styles with css/components.css. */
body.cs { color: #1d1d1f; }
/* Enter: pure CSS so first paint never waits for JS. Starts at 0.01 (visually identical to 0) because Chrome does not
   register a contentful paint while the whole page is at opacity 0. fill-mode "backwards" (not "both") leaves no transform behind,
   which would otherwise turn .dm-page-root into the containing block of the fixed nav. */
@keyframes dmPageEnter { from { opacity: 0.01; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.dm-page-root.dm-page-enter { animation: dmPageEnter 600ms var(--ease-out) backwards; }
.dm-page-root.dm-page-exit { opacity: 0; transform: translateY(-16px); transition: opacity 380ms var(--ease-out), transform 380ms var(--ease-out); }
.cs .nav-logo img { opacity: 1; animation: none; }

/* Hero */
.cs-hero { padding: 64px clamp(20px, 5vw, 60px) 0; max-width: 1180px; margin: 0 auto; text-align: center; }
.cs-hero-eyebrow { color: #6e6e74; font-size: 1.25rem; font-weight: 500; }
.cs-hero h1 { margin: 16px 0 0; color: #1d1d1f; font-weight: 700; font-size: clamp(2.5rem, 7vw, 5.5rem); line-height: 1.02; letter-spacing: -0.01em; }
.cs-hero-lead { margin: 20px auto 0; color: #6e6e74; font-size: 1.25rem; font-weight: 400; max-width: 560px; }
.cs-hero-image { padding: 48px clamp(20px, 5vw, 60px) 0; max-width: 1180px; margin: 0 auto; }
.cs-hero-image .cs-img { width: 100%; aspect-ratio: 16 / 8; border-radius: 32px; }

/* Image boxes. A box is either an <img> or a clearly-marked pending placeholder (see assets/img/work/<slug>/README.md). */
.cs-img { overflow: hidden; position: relative; }
.cs-img img { width: 100%; height: 100%; object-fit: cover; }
.cs-img[data-pending] { background: #eceeef; display: flex; align-items: center; justify-content: center; padding: 16px; }
.cs-img[data-pending] span { color: #6e6e74; font-size: 0.875rem; font-weight: 500; text-align: center; line-height: 1.4; }

/* Sections */
.cs-section { padding: 110px clamp(20px, 5vw, 60px); max-width: 1180px; margin: 0 auto; }
.cs-section.alt { background: #f7f7f5; }
.cs-overview { display: flex; flex-direction: row; gap: 80px; align-items: flex-start; }
.cs-overview h2 { flex-shrink: 0; width: 280px; color: #1d1d1f; font-weight: 600; font-size: 2rem; }
.cs-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 48px; flex: 1; }
.cs-fact { display: flex; flex-direction: column; gap: 6px; }
.cs-fact-label { color: #6e6e74; font-size: 0.9375rem; font-weight: 500; }
.cs-fact-value { color: #1d1d1f; font-size: 1.125rem; font-weight: 600; line-height: 1.35; }
.cs-twocol { display: flex; flex-direction: row; gap: 80px; align-items: flex-start; }
.cs-twocol-left { flex-shrink: 0; width: 460px; }
.cs-eyebrow { color: #6e6e74; font-size: 1.25rem; font-weight: 500; }
.cs-h2 { margin-top: 12px; color: #1d1d1f; font-weight: 600; font-size: 3rem; line-height: 1.15; }
.cs-body { color: #3f4147; font-size: 1.25rem; font-weight: 400; line-height: 1.6; flex: 1; }

/* Gallery */
.cs-gallery { display: flex; flex-direction: column; gap: 24px; padding: 48px clamp(20px, 5vw, 60px) 110px; max-width: 1180px; margin: 0 auto; }
.cs-gallery .full { width: 100%; aspect-ratio: 16 / 7; border-radius: 24px; }
.cs-gallery-row { display: flex; flex-direction: row; gap: 24px; }
.cs-gallery .half { flex: 1; width: 100%; aspect-ratio: 4 / 5; border-radius: 24px; }

/* Next project */
.cs-next { padding: 48px clamp(20px, 5vw, 60px) 110px; max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.cs-next-label { color: #6e6e74; font-size: 1.25rem; font-weight: 500; }
.dm-workcard { width: 100%; background: #fff; box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06); border-radius: 24px; padding: clamp(10px, 1.8vw, 22px); display: flex; flex-flow: row wrap; gap: 20px; align-items: center; }
.dm-workcard.dm-card-leaving { opacity: 0.85; transform: scale(1.015); transition: opacity 380ms var(--ease-out), transform 380ms var(--ease-out); }
.cs-next-img { flex: 1 1 150px; max-width: 236px; aspect-ratio: 1 / 1; border-radius: 18px; overflow: hidden; background: #f6f6f6; }
.cs-next-img img { width: 100%; height: 100%; object-fit: cover; }
.cs-next-body { flex: 1 1 320px; max-width: 654px; display: flex; flex-direction: column; gap: 20px; }
.cs-next-text { display: flex; flex-direction: column; gap: 20px; }
.cs-next-text-inner { display: flex; flex-direction: column; gap: 8px; }
.cs-next-cat { color: #6e6e74; font-size: 0.9375rem; font-weight: 400; line-height: 18px; }
.cs-next-title { color: #1d1d1f; font-size: 1.5rem; font-weight: 600; line-height: 29px; }
.cs-next-desc { color: #1d1d1f; font-size: 1rem; font-weight: 400; line-height: 22px; }
.cs-next-cta { width: 200px; height: 60px; position: relative; display: flex; align-items: center; background: #3c3a35; box-shadow: 0 16.6px 32.4px -5.8px rgba(0, 0, 0, 0.26); border-radius: 9999px; padding: 0 6px 0 16px; }
.cs-next-cta:hover { color: #fff; }
div.cs-next-cta { background: #828282; cursor: default; }
.cs-next-cta > span:first-child { color: #fff; font-weight: 700; font-size: 0.9375rem; }
.cs-next-cta .arrow { margin-left: auto; width: 36px; height: 36px; border-radius: 50%; background: #f8f8f8; display: flex; align-items: center; justify-content: center; }
.cs-next-cta .arrow img { width: 13px; height: 9.3px; }

@media (max-width: 479px) {
  .cs-hero { padding: 32px 20px 0; }
  .cs-hero-eyebrow { font-size: 1rem; }
  .cs-hero h1 { margin-top: 12px; font-size: 2.5rem; }
  .cs-hero-lead { margin-top: 16px; font-size: 1rem; }
  .cs-hero-image { padding: 32px 20px 0; }
  .cs-hero-image .cs-img { aspect-ratio: 4 / 5; border-radius: 20px; }
  .cs-section { padding: 56px 20px; }
  .cs-overview { flex-direction: column; gap: 24px; }
  .cs-overview h2 { width: auto; font-size: 1.5rem; }
  .cs-meta { gap: 20px 16px; }
  .cs-fact-label, .cs-fact-value { font-size: 0.875rem; }
  .cs-twocol { flex-direction: column; gap: 20px; }
  .cs-twocol-left { width: auto; }
  .cs-eyebrow { font-size: 1rem; }
  .cs-h2 { margin-top: 10px; font-size: 1.5rem; }
  .cs-body { font-size: 1rem; }
  .cs-gallery { gap: 12px; padding: 32px 20px 56px; }
  .cs-gallery .full { aspect-ratio: 4 / 3; border-radius: 16px; }
  .cs-gallery-row { flex-direction: column; gap: 12px; }
  .cs-gallery .half { aspect-ratio: 4 / 3; border-radius: 16px; }
  .cs-next { padding: 32px 20px 56px; gap: 16px; }
  .cs-next-label { font-size: 1rem; }
  .dm-workcard { border-radius: 14px; padding: 14px 12px; flex-direction: column; gap: 10px; align-items: stretch; }
  .cs-next-img { flex: none; max-width: none; height: 110px; aspect-ratio: auto; border-radius: 8px; }
  .cs-next-body { flex: none; max-width: none; gap: 10px; }
  .cs-next-cat { font-size: 0.75rem; line-height: 14px; }
  .cs-next-title { font-size: 1rem; line-height: 20px; }
  .cs-next-desc { font-size: 0.75rem; line-height: 15px; }
  .cs-next-cta { width: 100%; }
  .cs-next-cta > span:first-child { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .dm-page-root.dm-page-enter { animation: none !important; }
  .dm-page-root.dm-page-exit { opacity: 1 !important; transform: none !important; transition: none !important; }
}
