/* r22 · the project pages (work/*.html). Built on ../_code/v3.css — its look tokens (colour, background, components,
   type), buttons, header, footer and background layer — so a project page wears whatever look the homepage wears.
   The order follows by Crawford's case studies: the site large in a rounded card · the name beside the facts · what is
   on the site · its screens rising out of the client's own colours · the site in motion in a panel · the client's
   words · the next project · the enquiry. Spacing scale only: 4 8 12 16 24 32 48 64 96 128 160. */

.pj main { padding-top: calc(var(--hd-h) + 8px); }
.pj-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
.pj-sec { padding-block: clamp(72px, 8.4vw, 136px); }
.pj-label { font-family: var(--f-l); font-weight: var(--w-l); font-size: 13px; line-height: 1.4; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.pj-h2s { font-family: var(--f-d); font-weight: var(--w-d2); letter-spacing: var(--t-d2); font-size: calc(clamp(28px, 2.6vw, 40px) * var(--ds2)); line-height: 1.15; }

/* ── 1 · the site in a rounded card ───────────────────────────── */
.pj-hero__card { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--card-r); background: #050506; clip-path: inset(0 round var(--card-r));   /* clip-path too: without it Chrome can paint the film's layer past the card */
  height: clamp(340px, min(46vw, calc(100vh - var(--hd-h) - 264px)), 760px);
  box-shadow: 0 0 0 1px var(--card-line), 0 48px 120px -48px rgba(0,0,0,.75); }
.pj-hero__card::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
.pj-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.pj-media--left { object-position: 0 0; }
.pj-only-p { display: none; }
html.motion:not(.clean) .pj-hero__card .pj-media { animation: pj-settle 1.8s cubic-bezier(.16,1,.3,1) both; }
@keyframes pj-settle { from { transform: scale(1.06); } to { transform: none; } }
.pj-hero__tag { position: absolute; z-index: 2; right: clamp(16px, 2vw, 24px); bottom: clamp(16px, 2vw, 24px); background: color-mix(in srgb, var(--bg) 92%, #000); border-color: rgba(255,255,255,.22); }
.pj-hero__card .play { top: auto; bottom: 16px; }

/* ── 2 · the name beside the facts ────────────────────────────── */
.pj-intro { padding-top: clamp(48px, 4.6vw, 72px); row-gap: 40px; align-items: start; }
.pj-intro__head { grid-column: 1 / 7; }
.pj-intro__chip { margin-bottom: 24px; }
.pj-title { font-size: calc(clamp(48px, 6.4vw, 104px) * var(--ds)); line-height: var(--lh-h, 1.04); letter-spacing: var(--tr-h, var(--t-d)); text-wrap: balance; }
.pj-title .w { padding-top: .12em; margin-top: -.12em; }
.pj-intro__body { grid-column: 8 / 13; padding-top: 4px; }
.pj-lead { font-size: clamp(19px, 1.45vw, 22px); line-height: 1.5; color: var(--ink); max-width: 40ch; text-wrap: pretty; }
.pj-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 40px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.pj-facts dt { font-family: var(--f-l); font-weight: var(--w-l); font-size: 12px; line-height: 1.4; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.pj-facts dd { margin: 8px 0 0; font-size: 16px; line-height: 1.45; color: var(--ink); }

/* ── 3 · what is on the site ──────────────────────────────────── */
.pj-over__top { align-items: start; }
.pj-over__h { grid-column: 1 / 6; max-width: 11ch; }
.pj-parts { grid-column: 7 / 13; border-bottom: 1px solid var(--line); }
.pj-part { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: baseline; padding: 24px 0; border-top: 1px solid var(--line); }
.pj-part__no { font-family: var(--f-l); font-weight: var(--w-l); font-size: 13px; letter-spacing: .06em; color: var(--accent); font-variant-numeric: tabular-nums; }
.pj-part__t { font-family: var(--f-d); font-weight: var(--w-d2); letter-spacing: var(--t-d2); font-size: calc(clamp(22px, 2vw, 30px) * var(--ds2)); line-height: 1.22; text-wrap: balance; }

/* the screens, rising out of the client's own colours (by Crawford's tinted tiles) */
.pj-tiles { margin-top: clamp(64px, 7vw, 112px); row-gap: clamp(48px, 5vw, 72px); }
.pj-tile { margin: 0; min-width: 0; }
.pj-tile--7 { grid-column: span 7; }
.pj-tile--5 { grid-column: span 5; }
.pj-tile__g { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--card-r); height: clamp(380px, 38vw, 600px); background: var(--tint); }
.pj-tint--a { --tint: var(--tint-a); }
.pj-tint--b { --tint: var(--tint-b); }
/* a soft light from above and a hairline, so a dark tint still reads as a tile on a dark page */
.pj-tile__g::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(90% 70% at 50% 0%, rgba(255,255,255,.16), transparent 70%); }
.pj-tile__g::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.pj-scr { position: absolute; left: 50%; overflow: hidden; background: #000; transform: translate3d(-50%, var(--py, 0px), 0); will-change: transform; }
.pj-scr__m { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
/* a computer screen: bare, a thin dark edge, cut by the tile's foot */
.pj-scr--d { width: 86%; aspect-ratio: 16 / 10; bottom: -7%; border-radius: 12px; border: 5px solid #0B0C0E; box-shadow: 0 48px 96px -32px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.12); }
.pj-tile--5 .pj-scr--d { width: 90%; }
/* these two screens were taken a little wider than the site; the extra strip at the right is cut away */
.pj-scr--crop { aspect-ratio: 1316 / 900; }
.pj-scr__m--crop { width: 109.42%; max-width: none; object-position: 0 0; }
/* a phone: rising from the foot, the top of the phone in view */
.pj-scr--p { height: 104%; aspect-ratio: 390 / 844; top: 10%; border-radius: 34px; border: 6px solid #0B0C0E; box-shadow: 0 48px 96px -32px rgba(0,0,0,.65), 0 0 0 1px rgba(255,255,255,.14); }
.pj-tile--7 .pj-scr--p { height: 112%; }
.pj-cap { display: flex; align-items: baseline; gap: 16px; margin-top: 16px; font-size: 15px; line-height: 1.45; color: var(--muted); }
.pj-cap__no { font-family: var(--f-l); font-weight: var(--w-l); font-size: 12px; letter-spacing: .06em; color: var(--ink); font-variant-numeric: tabular-nums; }
.pj-tile__g .play { top: 16px; right: 16px; }

/* ── 4 · how it looks: the site in motion, rising out of a panel ── */
.pj-show-sec { padding-top: 0; }
.pj-show { position: relative; overflow: hidden; padding: clamp(48px, 6vw, 96px) 0 0; text-align: center; }
body.comp--3 .pj-show { background: transparent; }
.pj-show__h { margin: 0 auto; max-width: none; }
.pj-show__stage { position: relative; width: min(74%, 1040px); margin: clamp(40px, 5vw, 72px) auto 0; }
.pj-show__d { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; border: 6px solid #0B0C0E; border-bottom: 0; border-radius: 16px 16px 0 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 -24px 120px -40px color-mix(in srgb, var(--accent) 35%, transparent); }
.pj-show__d .pj-media { object-position: 50% 50%; }
.pj-show__p { position: absolute; right: -9%; bottom: -16%; width: 19%; aspect-ratio: 390 / 844; overflow: hidden; background: #000; border: 5px solid #0B0C0E; border-radius: 30px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.16), 0 40px 80px -24px rgba(0,0,0,.8); }
.pj-show__p .pj-media { object-position: 50% 0; }
.pj-show-sec .play { top: 16px; right: 16px; }
.pj-live { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 32px; margin-top: 24px; }
.pj-live__t { color: var(--muted); font-size: 15px; }
.pj-live__host { color: var(--ink); }

/* ── 5 · in their words ───────────────────────────────────────── */
.pj-words { border-top: 1px solid var(--line); }
.pj-words__grid { align-items: start; row-gap: 40px; }
.pj-words__head { grid-column: 1 / 5; }
.pj-words__note { margin-top: 24px; max-width: 30ch; }
.pj-q { grid-column: 5 / 13; margin: 0; }
.pj-q__b { margin: 0; }
.pj-q__t { position: relative; font-family: var(--f-d); font-weight: var(--w-d2); letter-spacing: var(--t-d); font-size: calc(clamp(28px, 3.3vw, 52px) * var(--ds2)); line-height: 1.18; text-wrap: pretty; }
.pj-q__hang { position: absolute; right: 100%; padding-right: .06em; color: var(--accent); }
.pj-q__by { display: flex; align-items: center; gap: 16px; margin-top: 40px; font-family: var(--f-l); font-weight: var(--w-l); font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.pj-q__by::before { content: ""; flex: none; width: 48px; height: 1px; background: var(--accent); }

/* ── 6 · the next project ─────────────────────────────────────── */
.pj-next-sec { border-top: 1px solid var(--line); }
.pj-next-sec .pj-label { margin-bottom: 24px; }
.pj-next { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: center; padding: clamp(16px, 1.6vw, 24px); color: var(--ink); text-decoration: none;
  transition: border-color .4s, background-color .4s, transform .6s cubic-bezier(.16,1,.3,1); }
.pj-next:hover { border-color: var(--line-2); }
.pj-next__txt { grid-column: 1 / 6; display: flex; flex-direction: column; align-items: flex-start; padding: clamp(8px, 2vw, 32px); }
.pj-next__name { font-family: var(--f-d); font-weight: var(--w-d); letter-spacing: var(--tr-h, var(--t-d)); font-size: calc(clamp(40px, 5vw, 80px) * var(--ds)); line-height: var(--lh-h, 1.04); }
.pj-next__what { margin-top: 16px; font-family: var(--f-l); font-weight: var(--w-l); font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.pj-next__chip { margin-top: 16px; }
.pj-next__go { margin-top: 40px; pointer-events: none; }
.pj-next:hover .pj-next__go { border-color: rgba(255,255,255,.42); }
body.comp--2 .pj-next:hover .pj-next__go .btn__a, body.comp--3 .pj-next:hover .pj-next__go .btn__a { transform: translateX(4px); }
body.comp--1 .pj-next:hover .pj-next__go .btn__c { transform: rotate(-45deg); }
body.comp--3 .pj-next:hover .pj-next__go { background: var(--ink); color: var(--bg); }
.pj-next__vis { grid-column: 6 / 13; position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: max(calc(var(--card-r) - 8px), 2px); background: #000; }
.pj-next__vis img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; transition: transform 1.2s cubic-bezier(.16,1,.3,1); }
.pj-next:hover .pj-next__vis img { transform: scale(1.04); }

/* ── footer: the homepage's, without the form (the button takes you to it) ── */
.pj-ft { padding-top: clamp(96px, 10vw, 160px); }
.pj-ft__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; margin-top: clamp(32px, 3.4vw, 48px); }
.pj-ft__note { color: var(--muted); max-width: 40ch; }

/* ── reveals (motion only; never under ?clean=1, never with reduced motion) ── */
.rv { opacity: 0; transform: translateY(32px); transition: opacity 1s cubic-bezier(.16,1,.3,1), transform 1.1s cubic-bezier(.16,1,.3,1); }
.rv.is-in { opacity: 1; transform: none; }
.pj-split .wi { transform: translateY(110%); transition: transform 1.05s cubic-bezier(.16,1,.3,1); }
.pj-split.is-in .wi { transform: none; }

/* ── mid widths ───────────────────────────────────────────────── */
@media (max-width: 1099px) {
  .pj-intro__head { grid-column: 1 / 7; }
  .pj-intro__body { grid-column: 7 / 13; }
  .pj-over__h { grid-column: 1 / 6; }
  .pj-parts { grid-column: 6 / 13; }
  .pj-show__stage { width: 80%; }
}

/* ── phone ────────────────────────────────────────────────────── */
@media (max-width: 899px) {
  .pj-grid, .pj-next { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 16px; }
  .pj-intro__head, .pj-intro__body, .pj-over__h, .pj-parts, .pj-words__head, .pj-q, .pj-next__txt, .pj-next__vis { grid-column: 1 / -1; }
  .pj-over__h { margin-bottom: 40px; }
  .pj-tile--7, .pj-tile--5 { grid-column: 1 / -1; }
  .pj-tiles { row-gap: 48px; margin-top: 64px; }
  .pj-tile__g { height: auto; aspect-ratio: 4 / 3.6; }
  .pj-tile--5 .pj-tile__g:has(.pj-scr--p), .pj-tile--7 .pj-tile__g:has(.pj-scr--p) { aspect-ratio: 4 / 4.4; }
  .pj-scr--d, .pj-tile--5 .pj-scr--d { width: 90%; bottom: -6%; border-width: 4px; border-radius: 10px; }
  .pj-scr--p, .pj-tile--7 .pj-scr--p { height: 104%; top: 9%; border-radius: 30px; border-width: 5px; }
  .pj-q__hang { position: static; padding: 0; }
  .pj-next { padding: 12px; row-gap: 8px; }
  .pj-next__vis { order: -1; }
  .pj-next__txt { padding: 16px 8px 12px; }
  .pj-show { padding-top: 48px; }
  .pj-show__stage { width: 84%; margin-top: 40px; }
}
@media (max-width: 767px) {
  .pj-hero__card { height: auto; aspect-ratio: 4 / 4.6; max-height: calc(100svh - var(--hd-h) - 120px); min-height: 360px; }
  .pj-only-d { display: none; }
  .pj-only-p { display: block; }
  .pj-intro { padding-top: 40px; row-gap: 32px; }
  .pj-intro__chip { margin-bottom: 16px; }
  .pj-lead { font-size: 18px; }
  .pj-facts { margin-top: 32px; }
  .pj-part { grid-template-columns: 48px minmax(0, 1fr); padding: 20px 0; }
  .pj-show__stage { width: 90%; }
  .pj-show__d { border-width: 4px; border-radius: 12px 12px 0 0; }
  .pj-show__p { width: 26%; right: -6%; border-width: 4px; border-radius: 20px; }
  .pj-live { margin-top: 16px; }
  .pj-ft__acts .btn { width: 100%; }
}
