/* ============ Selected work, version 2: a gallery wall and a case-study room ============
   One row of tall, colored posters, one per project, that scrolls sideways so the
   page stays short. Opening a poster opens a full-screen room in the client's color:
   the live site large on the left, the story on the right. */
.wk { padding: clamp(40px, 6vw, 72px) 0 0 }
.wk-head { display: flex; align-items: end; justify-content: space-between; gap: 20px 40px; flex-wrap: wrap; margin-bottom: clamp(20px, 2.6vw, 30px) }
.wk-head .eyebrow { margin-bottom: 14px; color: var(--sun-deep) }
.wk-head h2 { font-size: clamp(38px, 4.6vw, 66px); line-height: .98 }
.wk-head h2 span { display: block; color: var(--muted) }
.wk-nav { display: flex; align-items: center; gap: 10px }

.wk .pp-draft { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 99px; background: var(--ink); color: var(--paper); letter-spacing: .12em; vertical-align: 1px }

/* The rail: posters that bleed off the right edge to say "there's more". */
.wk-nav { display: flex; align-items: center; gap: 10px }
.wk-arrow { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--ink); border-radius: 50%; background: transparent; color: var(--ink); font-size: 18px; cursor: pointer; transition: background .2s, color .2s, opacity .2s }
.wk-arrow:hover { background: var(--ink); color: var(--paper) }
.wk-arrow:disabled { opacity: .3; cursor: default; background: transparent; color: var(--ink) }
/* Room above and below so the hover lift and its shadow are never cut off. */
.wk-rail { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(270px, 28vw, 380px); gap: clamp(12px, 1.6vw, 20px); margin: -14px calc(50% - 50vw) -48px 0; padding: 14px calc(50vw - 50%) 64px 0; list-style: none; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none }
.wk-rail::-webkit-scrollbar { display: none }
.wk-item { scroll-snap-align: start; min-width: 0 }
.wk-card { position: relative; display: flex; flex-direction: column; width: 100%; height: clamp(400px, 34vw, 480px); padding: 22px 22px 0; overflow: hidden; border: 0; border-radius: 22px; background: var(--wk-bg); color: var(--wk-ink); text-align: left; cursor: pointer; isolation: isolate; transition: transform .45s cubic-bezier(.2, .7, .2, 1), box-shadow .45s }
.wk-card::after { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 70% at 100% 0%, #ffffff40, #ffffff00 60%); pointer-events: none }
.wk-card { transition: transform .45s cubic-bezier(.2, .7, .2, 1), box-shadow .45s }
.wk-card:hover { transform: translateY(-6px); box-shadow: 0 30px 50px -30px #00000059 }
.wk-card:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px }
.wk-card-top { display: flex; align-items: center; justify-content: space-between; min-height: 24px }
.wk-num { font-size: 12px; font-weight: 600; letter-spacing: .16em; opacity: .72; font-variant-numeric: tabular-nums }
.wk-tag { padding: 3px 10px; border: 1px solid currentColor; border-radius: 99px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .8 }
.wk-name { margin-top: 16px; font-family: var(--display); font-size: clamp(28px, 2.6vw, 36px); font-weight: 800; line-height: 1; letter-spacing: -.045em; text-wrap: balance }
.wk-cat { margin-top: 8px; font-size: 13px; font-weight: 600; letter-spacing: .02em; line-height: 1.4; opacity: .7 }
.wk-sum { max-width: 26ch; margin-top: 14px; font-size: 16px; line-height: 1.45; opacity: .92 }
.wk-shot { position: absolute; left: 22px; right: -90px; bottom: -24px; display: block; overflow: hidden; border-radius: 10px 10px 0 0; background: #fff; box-shadow: 0 -2px 0 #0000000d, 0 30px 60px -20px #00000059; transform: rotate(-2deg); transform-origin: 0 100%; transition: transform .55s cubic-bezier(.2, .7, .2, 1) }
.wk-bar { display: flex; gap: 5px; padding: 8px 10px; background: #f3f1ec }
.wk-bar i { width: 7px; height: 7px; border-radius: 50%; background: #d9d4cb }
.wk-shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: top }
.wk-card:hover .wk-shot { transform: rotate(0deg) translateY(-14px) }

/* ---------- The case-study room ---------- */
html:has(.cs[open]) { overflow: hidden }
.cs { width: calc(100vw - 40px); max-width: 1500px; height: calc(100dvh - 40px); max-height: none; margin: auto; padding: 0; border: 0; border-radius: 26px; background: var(--cs-bg, var(--paper)); color: var(--cs-ink, var(--ink)); box-shadow: 0 50px 120px -40px #000000a6; overflow: hidden }
.cs::backdrop { background: #161514b3; backdrop-filter: blur(6px) }
.cs[open] { animation: cs-in .5s cubic-bezier(.22, 1, .36, 1) both }
@keyframes cs-in { from { opacity: 0; transform: translateY(18px) scale(.985) } to { opacity: 1; transform: none } }
.cs-sheet { display: grid; grid-template-columns: minmax(0, 1fr) clamp(320px, 28vw, 420px); height: 100%; transition: background .4s }
.cs-stage { display: flex; min-width: 0; min-height: 0; padding: clamp(18px, 2.4vw, 32px) 0 clamp(18px, 2.4vw, 32px) clamp(18px, 2.4vw, 32px) }
.cs-browser { display: flex; flex-direction: column; flex: 1; min-width: 0; overflow: hidden; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px #00000014, 0 40px 80px -40px #00000080 }
.cs-bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 10px 14px; background: #f3f1ec; color: #4b463f; font-size: 13px }
.cs-dots { display: flex; gap: 6px }
.cs-dots i { width: 10px; height: 10px; border-radius: 50%; background: #d9d4cb }
.cs-dots i:first-child { background: #ec6a5e }
.cs-dots i:nth-child(2) { background: #f4bf4f }
.cs-dots i:last-child { background: #61c554 }
.cs-domain { justify-self: center; max-width: 100%; overflow: hidden; padding: 4px 14px; border-radius: 99px; background: #fffefc; text-overflow: ellipsis; white-space: nowrap }
.cs-toggle { padding: 4px 2px; border: 0; background: none; color: #161514; font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer }
.cs-view { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #fff }
.cs-img { width: 100%; height: 100%; object-fit: cover; object-position: top }
.cs-frame-host { position: absolute; inset: 0; overflow: hidden }
.cs-frame-host iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; background: #fff }

.cs-story { display: flex; flex-direction: column; min-height: 0; padding: clamp(18px, 2.4vw, 32px) clamp(20px, 2.6vw, 36px) }
.cs-story-top { display: flex; align-items: center; justify-content: space-between; gap: 12px }
.cs-count { font-size: 12px; font-weight: 600; letter-spacing: .16em; opacity: .7; font-variant-numeric: tabular-nums }
.cs-close { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid currentColor; border-radius: 50%; background: transparent; color: inherit; font-size: 22px; line-height: 1; cursor: pointer; transition: background .2s, color .2s }
.cs-close:hover { background: var(--cs-ink); color: var(--cs-bg) }
.cs-body { flex: 1; min-height: 0; margin: 18px -8px 0 0; padding-right: 8px; overflow-y: auto; scrollbar-width: thin }
.cs-body > * { animation: cs-rise .55s cubic-bezier(.22, 1, .36, 1) both }
.cs-body > :nth-child(2) { animation-delay: .04s }
.cs-body > :nth-child(3) { animation-delay: .08s }
.cs-body > :nth-child(4) { animation-delay: .12s }
.cs-body > :nth-child(5) { animation-delay: .16s }
@keyframes cs-rise { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }
.cs-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; opacity: .72 }
.cs .cs-name:focus, .cs .cs-name:focus-visible { outline: none }
.cs-name { margin-top: 12px; font-family: var(--display); font-size: clamp(36px, 3.4vw, 54px); font-weight: 800; line-height: .96; letter-spacing: -.05em; outline: 0; text-wrap: balance }
.cs-summary { margin-top: 14px; font-size: 18px; line-height: 1.5; opacity: .86 }
.cs-steps { display: grid; gap: 18px; margin: 26px 0 0; padding: 22px 0 0; border-top: 1px solid color-mix(in srgb, var(--cs-ink) 18%, transparent); list-style: none }
.cs-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px }
.cs-step-n { padding-top: 3px; font-size: 11px; font-weight: 600; letter-spacing: .1em; opacity: .6 }
.cs-steps h4 { margin: 0 0 4px; font-size: 15px; font-weight: 700 }
.cs-steps p { margin: 0; font-size: 15px; line-height: 1.6; opacity: .84 }
.cs-visit { display: inline-flex; align-items: center; gap: 10px; margin-top: 26px; padding: 12px 18px; border-radius: 99px; background: var(--cs-ink); color: var(--cs-bg); font-size: 14px; font-weight: 600; text-decoration: none; transition: transform .2s }
.cs-visit:hover { transform: translateY(-2px) }
.cs-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px solid color-mix(in srgb, var(--cs-ink) 18%, transparent) }
.cs-pager button { display: grid; gap: 2px; padding: 10px 12px; border: 0; border-radius: 12px; background: color-mix(in srgb, var(--cs-ink) 7%, transparent); color: inherit; text-align: left; cursor: pointer; transition: background .2s }
.cs-pager button:hover { background: color-mix(in srgb, var(--cs-ink) 14%, transparent) }
.cs-pager .cs-next { text-align: right }
.cs-pager small { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; opacity: .65 }
.cs-pager strong { font-size: 15px; font-weight: 700 }
.cs :focus-visible { outline: 3px solid var(--cs-ink); outline-offset: 3px }

@media (max-width: 900px) {
  .cs { width: 100vw; height: 100dvh; border-radius: 0 }
  .cs-sheet { display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain }
  .cs-story { display: contents }
  .cs-story-top { position: sticky; top: 0; z-index: 3; order: 0; padding: 12px 16px; background: var(--cs-bg) }
  .cs-stage { order: 1; flex: none; height: 72dvh; padding: 0 12px }
  .cs-body { order: 2; flex: none; margin: 0; padding: 22px 18px 8px; overflow: visible }
  .cs-pager { order: 3; margin: 8px 18px 22px }
  .cs-name { font-size: 36px }
  .cs-summary { font-size: 16px }
}
@media (max-width: 640px) {
  .wk-rail { grid-auto-columns: 78vw }
  .wk-rail { grid-auto-columns: 78vw }
  .wk-card { height: 420px }
  .wk-arrow { width: 42px; height: 42px }
  .wk-arrow { width: 42px; height: 42px }
}
@media (prefers-reduced-motion: reduce) {
  .wk-card, .wk-shot, .cs[open], .cs-body > * { transition: none; animation: none }
}
