/* joshyuledesign.com — project page layout, shared by every case page. */
/* ---------- Project page ---------- */
.proj-hero{padding:clamp(110px,14vw,190px) 0 clamp(30px,5vw,60px)}
.proj-hero h1{font-family:var(--display);font-weight:700;color:var(--blue);margin:0;
  font-size:clamp(40px,8.4vw,116px);line-height:.88;letter-spacing:0;text-transform:uppercase}
.proj-meta{display:flex;flex-wrap:wrap;gap:10px 40px;margin:clamp(22px,3.4vw,40px) 0 0;
  padding:22px 0 0;border-top:2px solid var(--line);list-style:none}
.proj-meta div{display:grid;gap:3px}
.proj-meta dt{font-family:var(--ui);font-weight:700;font-size:10.5px;letter-spacing:.14em;
  text-transform:uppercase;color:var(--orange)}
.proj-meta dd{margin:0;font-family:var(--ui);font-weight:600;font-size:15px;color:var(--blue);
  text-transform:uppercase;letter-spacing:.02em}

.chapter{padding:clamp(34px,5.5vw,76px) 0 0}
.chapter > p.cap{max-width:52ch;margin:0 0 clamp(18px,2.6vw,30px);
  font-family:var(--ui);font-weight:600;font-size:clamp(13px,1.5vw,16px);letter-spacing:.06em;
  text-transform:uppercase;color:var(--muted);line-height:1.5}
.chapter h2{font-family:var(--display);font-weight:700;color:var(--blue);margin:0 0 12px;
  font-size:clamp(26px,4.4vw,58px);line-height:.95;letter-spacing:0;text-transform:uppercase}

.plates{display:grid;gap:clamp(14px,2.2vw,26px)}
/* two real columns, not auto-fit: a plate that spans the row would
   otherwise leave four live tracks and shrink its neighbour to a quarter */
.plates.two{grid-template-columns:repeat(2,1fr)}
@media (max-width:820px){.plates.two{grid-template-columns:1fr}}
.plate{margin:0;border:2px solid var(--line);border-radius:var(--radius);overflow:hidden;background:#F2F5FF}
/* A long thin picture in a two-up row leaves a tall empty block under
   itself, so it takes a row of its own instead. */
.plate.wide{grid-column:1/-1}
.plate img{width:100%;height:auto;display:block}

.backbar{padding:clamp(50px,8vw,100px) 0 clamp(20px,3vw,40px)}
.backlink{display:inline-flex;align-items:center;gap:12px;padding:13px 24px;
  border:2px solid var(--blue);border-radius:999px;text-decoration:none;
  font-family:var(--ui);font-weight:700;font-size:12px;letter-spacing:.1em;
  text-transform:uppercase;color:var(--blue);position:relative;overflow:hidden;
  transition:color .35s ease}
.backlink::before{content:"";position:absolute;inset:0;background:var(--blue);
  transform:scaleX(0);transform-origin:left center;
  transition:transform .5s cubic-bezier(.22,.61,.36,1)}
.backlink span{position:relative;z-index:1}
.backlink:hover::before,.backlink:focus-visible::before{transform:scaleX(1)}
.backlink:hover,.backlink:focus-visible{color:#fff}
/* Text and one picture side by side, so a short chapter does not leave a
   column of white next to its paragraph. */
.split{display:grid;gap:clamp(24px,3.6vw,56px);align-items:center;
  margin-bottom:clamp(14px,2.2vw,26px)}
@media (min-width:860px){
  .split{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
}
.split .prose{margin:0}
/* A square photo next to a short column of text leaves a band of white
   above and below the text. Cropping it to 4:3 trims the empty studio
   backdrop, not the record, and pulls the two columns closer in height. */
@media (min-width:860px){
  .split .plate{aspect-ratio:4/3}
  .split .plate img{width:100%;height:100%;object-fit:cover}
}

/* body copy on project pages */
.prose{max-width:66ch;margin:0 0 clamp(18px,2.6vw,28px);font-size:clamp(15px,1.6vw,18px);
  line-height:1.65;color:var(--ink)}
.chapter h2 + .prose{margin-top:4px}

/* plate grids */
/* three real columns. Portraits and landscapes are kept in rows of their
   own in the markup, so a row never mixes proportions and no picture leaves
   an empty block beneath it. */
.plates.three{grid-template-columns:repeat(3,1fr)}
@media (max-width:820px){.plates.three{grid-template-columns:repeat(2,1fr)}}
@media (max-width:520px){.plates.three{grid-template-columns:1fr}}
.plates + .plates{margin-top:clamp(14px,2.2vw,26px)}

/* Video reels. Each frame takes its video's own aspect ratio, so nothing is
   cropped and nothing is letterboxed. The old site used object-fit:contain;
   contain here is a belt-and-braces guard against rounding. */
.reels{display:grid;grid-template-columns:repeat(2,1fr);gap:clamp(14px,2.2vw,28px)}
.reel{margin:0;border:2px solid var(--line);border-radius:var(--radius);overflow:hidden;
  background:#0c1020;aspect-ratio:var(--ar,16/9)}
.reel.wide{grid-column:1/-1}
.reel video{width:100%;height:100%;display:block;object-fit:contain;background:#0c1020}
@media (max-width:820px){
  .reels{grid-template-columns:1fr}
  .reel.wide{grid-column:auto}
}

/* ---------- Live app embed ----------
   The project running in the page. loading="lazy" keeps the app from
   booting until it is scrolled to, and the link below covers a browser
   that refuses to frame it. */
.demo{margin:0;border:2px solid var(--line);border-radius:var(--radius);
  overflow:hidden;background:#F2F5FF}
.demo iframe{display:block;width:100%;height:clamp(560px,78vh,880px);border:0}
.demo-note{margin:14px 0 0;font-family:var(--ui);font-weight:700;font-size:11px;
  letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.demo-note a{color:var(--blue);text-decoration:none;border-bottom:1.5px solid currentColor}
.demo-note a:hover{color:var(--orange)}

/* Hard breaks that set a heading's lines on a wide screen, but would push
   a long word past the edge on a small phone. Below 430px the text wraps
   on its own instead. */
@media (max-width:430px){
  .softbr{display:none}
}

/* A heading that runs to three lines wants a little more air between them
   than a one-liner does. At .95 the apostrophe ending one line sits almost
   on the caps of the next, and the two lines read as one word. */
.chapter h2.airy{line-height:1.1}

/* Autoplay gets refused more often than it used to: iOS does it in Low
   Power Mode, and any browser will if the tab has had no interaction yet.
   The fallback used to be the native controls, which drop a scrubber and a
   timecode over a silent decorative loop and make it look like a player
   that has broken. A play button over the poster says the same thing and
   looks deliberate. */
.reel{position:relative}
.reel-play{position:absolute;inset:0;margin:0;padding:0;border:0;cursor:pointer;
  display:grid;place-items:center;background:rgba(12,16,32,.38);
  -webkit-tap-highlight-color:transparent}
.reel-play svg{width:clamp(46px,7vw,66px);height:auto;fill:#fff;
  filter:drop-shadow(0 2px 12px rgba(0,0,0,.5));transition:transform .25s}
.reel-play:hover svg,.reel-play:focus-visible svg{transform:scale(1.12)}
.reel-play:focus-visible{outline:3px solid var(--lime);outline-offset:-5px}
