/* ---------- project page ---------- */

/* No top padding: the images run the full height of the viewport, passing
   under the header and the footer with no white band at either end. */
/* The scroller is .project itself, so a wheel anywhere over the page scrolls
   natively — including over the copy column, which used to need a hand-written
   forwarder that skipped the seam entirely. */
.project{
  position:absolute;
  inset:0;
  padding:0 var(--pad);
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-width:none;
  visibility:hidden;
  pointer-events:none;
  /* held visible until the fade-out has finished, or removing the class would
     cut the page away instead of letting it leave */
  transition:visibility 0s linear 420ms;
}
body.project-open .project{visibility:visible;pointer-events:auto;transition-delay:0s}
.project::-webkit-scrollbar{display:none}

/* The two views cross-fade: the strip leaves, then the page arrives. Nothing
   travels between them. */
/* AND ONCE IT HAS FADED IT IS HIDDEN, not just transparent (2026-09-21).
   Safari still composites an opacity:0 strip — 105 cards of image and video
   layers — so anything that moved the page over it paid for it: the checkout's
   slide off a project page dropped frames of 70–160ms, and with the strip
   hidden it runs at a steady 60. `visibility` waits out the fade on the way
   out and returns the instant the fade back in begins. (Children that set
   their own `visibility:visible` still sit inside the strip's opacity:0.) */
.stage{transition:opacity var(--fade) var(--fade-ease) var(--fade-gap),visibility 0s linear var(--fade-gap)}
body.project-open .stage,
body.about-open .stage,
body.doc-open .stage,
body.nf-open .stage,
body.services-open .stage,
body.worklist-open .stage{opacity:0;visibility:hidden;transition:opacity var(--fade) var(--fade-ease) 0s,visibility 0s linear var(--fade);pointer-events:none}
body.project-open .arrows,
body.about-open .arrows,
body.doc-open .arrows,
body.nf-open .arrows,
body.services-open .arrows,
body.worklist-open .arrows{opacity:0;pointer-events:none;transition-delay:0s}

/* transform is reserved for the rubber band, driven frame by frame —
   deliberately NO transition here. The gap is BETWEEN projects and is five
   times the gap inside one; the matching bottom padding is what makes the
   column genuinely END one seam past the last image, so overscrolling there
   is the barrier rather than something simulated on top of it. */
.proj-scroll{
  display:flex;
  flex-direction:column;
  gap:var(--seam);
  padding-bottom:var(--seam);
  opacity:0;
  transition:opacity var(--fade) var(--fade-ease);
}
body.project-open .proj-scroll{opacity:1;transition:opacity var(--fade) var(--fade-ease) var(--fade-gap)}
/* jumping from the index swaps the whole column, so it cross-fades rather than
   cutting — the same move the strip and the project page already make between
   views, just shorter because nothing else on screen changes */
body.project-open .proj-scroll.is-swapping{opacity:0;transition:opacity 120ms var(--ease)}
body.project-open .proj-scroll.is-swapped{transition:opacity 260ms var(--ease)}   /* straight back in: no delay, no empty beat */

/* Figma Desktop_Project Page (500:1327): copy at x=20 w=555, gutter 20, images
   at x=595 w=785, right margin 20 — the four add back to 1400, so the split is
   kept as a ratio rather than pixels and still resolves to exactly 555/785.
   Flex rather than grid because flex-grow animates, and the split has to move
   when the image column is enlarged. */
.proj-part{
  display:flex;
  gap:var(--gap);
}
/* Hovering the images drifts the column wider as a hint; clicking commits.
   Only the COPY's basis is animated — the images are simply whatever is left,
   so they follow the same curve without a transition of their own that could
   fall out of step. Two independently animated columns is what made
   minimizing stutter. Written out per state rather than through a custom
   property: an unregistered custom property cannot be interpolated, so the
   width would jump to the new value instead of travelling to it. */
html.zoom-squeeze .proj-part.is-near > .part-copy{
  flex-basis:calc(515px + var(--extra) * var(--text-share));
}
html.zoom-squeeze .proj-part.is-zoomed > .part-copy{
  flex-basis:calc(300px + var(--extra) * var(--text-share));
}
/* THE PICTURES GROW OVER THE COPY (2026-10-05, his report: enlarged, the copy
   squeezed to ~300px, ran taller than the window and — being sticky — could
   not be read to its end until the whole project had scrolled past). After
   SPACE10's project pages: the copy NEVER changes now; the picture column
   grows leftwards OVER it (255 on a click — the images land exactly where they
   used to; the hover is 10, see below), and the copy simply
   sits underneath. The person zooming has chosen the pictures. Only the
   pictures' margin moves, on the same --grow curve, so there is still one
   animated property. The squeeze is kept at ?zoom=squeeze to compare. */
/* THE HOVER IS THE HOME PAGE'S (2026-10-05, his pick after trying 10px at 240ms
   and 480ms): an open card on the strip swells 20px over --swell (1000ms, a
   slow start) as a hint, and so do these pictures, both on and off. Only a
   click's growth and its return keep the project page's --grow, held by
   .is-zooming for its length (a transition is the DESTINATION state's, so the
   hover's clock would otherwise drag a zoom-out). The copy stays sharp under
   the pictures — a fade and the menu's blur were both tried and dropped. */
@media (min-width:769px){   /* a laptop's: a phone's project page has no enlarging */
  html:not(.zoom-squeeze) .part-shots{
    position:relative;
    z-index:1;
    transition:margin-left var(--swell) var(--swell-ease);   /* the home page's open-card swell, exactly (his pick) */
  }
  html:not(.zoom-squeeze) .proj-part.is-zooming > .part-shots{transition:margin-left var(--grow) var(--grow-ease)}
  html:not(.zoom-squeeze) .proj-part.is-near > .part-shots{margin-left:-20px}
  html:not(.zoom-squeeze) .proj-part.is-zoomed > .part-shots{margin-left:-255px}
}

/* Sticky, not pinned: the copy holds at the header line while its OWN images
   scroll, then the next project's copy carries it out and arrives level with
   the top of that project's first image (792:1199). A sticky grid item is
   constrained by the grid container, which is exactly this project's extent. */
.part-copy{
  flex:0 1 var(--copy-w);
  min-width:0;
  position:sticky;
  /* LONG WORDS SCROLL WITH THE PAGE, THEN HOLD (2026-10-28, his report: a
     write-up taller than the window could not be read until the pictures had
     run out). --copy-top is set per column by app.js: the header line when the
     words fit, otherwise high enough that their end lands 70 above the foot —
     so the page carries them up until the last line shows, and they hold there. */
  top:var(--copy-top, var(--header-h));
  align-self:flex-start;
  /* cancels the seam band: the images stretch, the copy holds its line rather
     than being dragged up over the wordmark */
  transform:translate3d(0,var(--band,0px),0);
  opacity:0;
  /* ONE declaration: a second `transition` here silently replaced the first,
     so the copy column snapped to its new width while the images animated —
     which is what made the growth feel rough */
  transition:opacity 220ms var(--ease),
             flex-basis var(--grow) var(--grow-ease);
}
/* the copy lands a beat after the images, so the page reads image-then-word */
body.project-open .part-copy{
  opacity:1;
  transition:opacity 340ms var(--ease) 360ms,
             flex-basis var(--grow) var(--grow-ease);
}

/* The image column takes whatever the copy leaves. Basis 785 so that at 1400
   the two exactly fill the row, and so that below 1400 they shrink in
   proportion rather than the images taking all of the loss. */
.part-shots{
  flex:1 1 785px;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:var(--gap);
}
/* THE PROJECT YOU LAND ON starts its first image level with its title (Anthony,
   2026-09-15) — the title sits on the header line, and the images used to start
   flush at the top of the screen, 70px above it. Only the first project in the
   stream: every project after it already arrives with its copy level with its
   first image. Opening from the strip, the index, a link or an index jump all
   rebuild the stream, so the project arrived at is always the first. */
.proj-scroll > .proj-part:first-child .part-shots{padding-top:var(--header-h)}
.shot-link{display:block;cursor:inherit;color:inherit;-webkit-user-drag:none}
.part-shots img,
.part-shots video,
.part-shots canvas{
  width:100%;height:auto;
  display:block;
  border-radius:var(--radius);
  background:var(--surface);
}

.proj-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  height:var(--caption-h);
}
/* Buy and share sit on the head's FOOT, not its top (Anthony, 2026-09-19:
   "should be 40"). The title and its line are 31 tall trimmed and the chips
   30, so top-aligned the chips ended a pixel short and stood 41 off the
   copy; on the foot, everything above the copy ends on one line, 40 clear. */
.proj-head .cap-actions{align-self:flex-end}
/* always an X: this is a fresh view, not a plus that rotated into one */
.project .plus,
.about .plus{transform:rotate(90deg)}

.proj-body{
  margin-top:var(--syn-gap);
  display:flex;
  flex-direction:column;
  gap:30px;   /* 30 between paragraphs, like every other paragraph gap on the site (was 14, missed by the sweep) */
}
.proj-body p{font-size:var(--fs-s)}

/* Figma 792:1316 — label above value, then the press kit. Rows 20px apart. */
/* One fact per line, so a long Service can run on (2026-11-03, his call). Client
   shows only where there is one. */
.proj-meta{
  margin:var(--syn-gap) 0 0;
  display:flex;
  flex-direction:column;
  gap:20px;
}
.meta-row{display:flex;flex-direction:column;gap:10px}   /* 7 until 2026-09-25: onto the 10 / 20 scale, still a tight pair */
.proj-meta dt,
.proj-meta dd{margin:0;font-size:var(--fs-s)}

/* THE UNDERLINE IS DRAWN, not a text-decoration. The link is an inline-block
   trimmed to cap height and baseline, so a text underline sits 3px OUTSIDE its
   box — and iOS Safari barely painted it there. A 1px line hung below the
   trimmed box reads the same everywhere. */
.press{
  position:relative;
  display:inline-block;
  margin-top:20px;
  font-size:var(--fs-s);
  text-decoration:none;
  transition:opacity 200ms var(--ease);
}
.press::after{
  content:'';
  position:absolute;
  left:0;
  right:0;
  top:calc(100% + 3px);
  height:1px;
  background:currentColor;
}
@media (hover:hover){.press:hover{opacity:.55}}.press.is-pressed{opacity:.55}

/* The peek. The next project cannot be mounted — the column has to end at the
   seam for the end-of-scroll to be the barrier — so this is a separate layer
   parked just below the fold that rises by exactly the band's own stretch.
   position:fixed keeps it out of the scroller's flow while still inheriting
   --band from it. */
.proj-peek{
  position:fixed;
  top:100%;
  left:50%;
  width:calc(100vw - 2 * var(--pad));
  /* THE NEXT PROJECT LIFTS INTO VIEW AT THE END (2026-11-17, his call: at the
     bottom it wasn't obvious another project was waiting). Reaching the end of
     the column eases it up by --peek-lift (seam.js); the band takes over from
     there, never adding to it, so the push through still lands without a jump. */
  transform:translate3d(-50%,calc(-1 * max(var(--band,0px), var(--peek-lift,0px))),0);
  display:flex;
  gap:var(--gap);
  pointer-events:none;
}
.peek-copy{
  flex:0 1 var(--copy-w);
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:8px;
  /* flush with the top of the peek, so the very first pixels of the pull
     already carry the name rather than 20px of empty padding */
}
.peek-copy .t{font-size:16px}
.peek-copy .s{font-size:var(--fs-s);opacity:.55}
.peek-media{
  flex:1 1 785px;
  min-width:0;
  height:60vh;                 /* only its top edge is ever on screen */
  overflow:hidden;
  border-radius:var(--radius);
  background:var(--surface);
}
.peek-media img,.peek-media video{width:100%;height:auto;display:block}
/* a gallery clip not yet made (page.js videoLater): its own shape, in the skeleton's ground */
.clip-wait{width:100%;border-radius:var(--radius);background:var(--surface)}
