/* ---------- stage / track ---------- */

/* fixed with real viewport dimensions: once the menu applies a filter this
   becomes a containing block, and a zero-height one would collapse the stage */
.blurwrap{
  position:fixed;
  inset:0;
  /* THE GROUND IS PAINTED HERE AS WELL AS ON html. It was added for Safari's
     blended chrome, which only reliably blends against a real painted layer
     beneath it — against the root's background alone the footer's ink can come
     out as itself. It also gives the checkout a page-coloured layer to slide
     away (html.co-on repaints this one, not the root). */
  background:var(--bg);
  transition:filter 520ms var(--ease),background 420ms var(--ease);
}
body.menu-open .blurwrap{filter:blur(24px)}


.stage{position:absolute;inset:0;overflow:hidden}
/* far off screen: not drawn, still measured (app.js farWatcher) */
.slide.is-far{visibility:hidden}


.track{
  position:absolute;
  bottom:calc(50vh - (var(--card-h) / 2));
  /* ON A WHOLE PIXEL (2026-09-28, his note: "a small black line… on the bottom
     of the card, not always black"): half the window's height is often a
     fraction (224.016px measured), and every card's rounded edge then fell
     between pixels, where the ground under its picture could show as a hairline */
  bottom:round(down, calc(50vh - (var(--card-h) / 2)), 1px);
  left:0;
  display:flex;
  align-items:flex-end;
  gap:var(--strip-gap);
  padding-left:var(--strip-pad, var(--pad));   /* the strip keeps its own margin (laptop: 10, 01-tokens.css) */
  will-change:transform;
}

/* ---------- slides ----------
   The slide's HEIGHT never changes — everything the hover lift moves lives in
   .head, absolutely positioned inside it, so hovering a card never re-lays out
   the track (that was the cause of the text shimmer on neighbouring cards).
   Its WIDTH does change, and deliberately so: an enlarged column reflows the
   flex row and pushes its neighbours out, keeping the 20px gutters constant
   instead of growing on top of them. */
.slide{
  position:relative;
  flex:0 0 auto;
  width:var(--sw,var(--card-w));
  height:var(--card-h);
  /* THE WIDTH'S CLOCK IS A VARIABLE, AND THERE IS ONLY ONE `transition` HERE
     (2026-09-17). The three states below used to restate the whole declaration
     to change the timing, and a fourth rule that needed to add a property —
     the journal entry's `transform`, which slides the neighbours in to close
     the hole — then had to out-specify all three or silently lose one. It lost
     to `.slide.is-open.is-zoomed`, which is (0,3,0): an enlarged column beside
     an opening entry got no transform transition at all and snapped into place
     (Anthony: "particularly no when the project card is zoomed in"). Timing in
     a variable, one declaration, and adding a property is now a single rule
     that cannot collide. */
  --slide-w:var(--card-open) var(--card-ease);
  transition:width var(--slide-w);
}
/* Closing the project page can hand the strip a different column than the one
   it was opened from. That swap happens while the strip is faded out, so it
   must not animate — the tail of a 620ms open would otherwise play as the
   strip fades back in. */
.slide.no-anim,
.slide.no-anim *{transition:none !important;animation:none !important}

/* the hover swell drifts in slowly so it reads as a hint rather than a
   reaction; committing to the full size stays quicker and more decisive */
.slide.is-open{--slide-w:var(--swell) var(--swell-ease)}
.slide.is-open.is-near{--sw:var(--zoom-hover)}
.slide.is-open.is-zoomed{--sw:var(--zoom-max);--slide-w:var(--card-open) var(--card-ease)}
/* A click is answered on one clock both ways (2026-09-26): un-enlarging used to
   fall back to the hover swell's slow-starting 1000ms, which read as lag after
   the click. The same goes for a card opened under the pointer: it rises and
   takes its hover width in ONE move on the open's clock (app.js nearNow),
   instead of landing and then swelling a beat later. */
.slide.is-open.is-unzooming,
.slide.is-open.is-opening{--slide-w:var(--card-open) var(--card-ease)}

/* The top inset is carried as permanent padding and cancelled by a matching
   negative transform. Applying it only on open made the card jump down that
   distance the instant it was clicked and then climb back — the "down then up"
   in the open animation. Constant padding means nothing moves discontinuously. */
.head{
  position:absolute;
  top:0;left:0;
  width:100%;
  padding-top:var(--open-top);
  display:flex;
  flex-direction:column;
  transform:translateY(calc(-1 * var(--open-top)));
  /* the drop from a hover takes the lift's own time (it fell through to the
     620ms open clock before, so a sweep across the strip left a trail of cards
     still sinking behind the pointer). Opening and closing set their own. */
  transition:transform var(--card-lift) var(--card-ease);
  will-change:transform;
}

/* hover raises the head by exactly gap + caption, so the caption occupies the
   space the media vacates */
.slide.is-hot .head{
  transform:translateY(calc(-1 * (var(--open-top) + var(--gap) + var(--caption-h))));
  transition-duration:var(--card-lift);
}
/* opening continues the same movement — the caption and its button ride up
   with the image rather than swapping out */
.slide.is-open .head{
  transform:translateY(calc(-1 * (var(--open-top) + var(--open-lift,0px))));
  transition-duration:var(--card-rise);
  transition-timing-function:var(--card-rise-ease);
}

/* The column's content; width comes from the slide. transform is reserved for
   the rubber band, which is driven frame by frame — deliberately NO transition
   here, or it would fight the decay and reintroduce the snap. */
.zoom{
  width:100%;
  display:flex;
  flex-direction:column;
}

/* aspect-ratio rather than a fixed height, so the cover grows with the column
   and still measures exactly 400x500 at rest */
.media{
  width:100%;
  aspect-ratio:4 / 5;              /* 400x500; must be unitless, not px */
  border-radius:var(--radius);
  overflow:hidden;
  background:var(--surface);
  flex:0 0 auto;
  /* NO cursor:pointer. Every card here sits on the moving strip, and the
     pointing hand over it flickered between hand and arrow — it is the one
     thing that ever reproduced the problem, on closed cards and open columns
     alike. The badge carries the affordance instead, which is why it says
     "Open" in words rather than relying on the cursor to imply it. Real
     controls (buttons, the select, the switch) keep their pointer: they are
     small, static chrome and have never flickered. */
  cursor:default;
}
/* a finger on a control: its pressed colour at once (app.js, PRESSING SHOWS ON A PHONE) */
.is-pressing,
.is-pressing *{transition:none !important}

/* SKELETONS (2026-11-04): a picture still on its way — a cover's box, a shot,
   a project page's picture — is --surface with a light sweep across it, until
   it is in (src/engine/skeleton.js takes .is-loading off). Still, without the
   sweep, for reduced motion. */
.is-loading{
  background-color:var(--surface);
  background-image:linear-gradient(100deg,transparent 35%,var(--skel-sheen) 50%,transparent 65%);
  background-size:250% 100%;
  background-repeat:no-repeat;
  animation:skel-sweep 1.6s linear infinite;
}
@keyframes skel-sweep{from{background-position:120% 0}to{background-position:-20% 0}}
/* and where the picture's own 32px copy is known, that instead of the sweep: the picture,
   soft, in its place, until it is in (2026-11-16) */
.is-loading.has-preview{background-image:var(--preview);background-size:cover;background-position:center;animation:none}
@media (prefers-reduced-motion:reduce){.is-loading{animation:none;background-image:none}}

/* a cover still loading fades in over its skeleton rather than popping (strip/build.js arrive) */
/* AND ONCE IT IS IN, THE BOX'S GROUND GOES (2026-09-28): where the rounded box's
   edge is antialiased (a fractional position, a card lifted or moving on the
   GPU) a sliver of what is painted under the picture bled out at its edge.
   With the picture in, nothing needs it, so the edge blends with the page. */
.media:has(> img.is-in),
.media:has(> video.is-in),
.media:has(> canvas.is-in){background-color:transparent !important;transition:background-color 0s linear 320ms}   /* after its 280ms fade */
.media img.is-arriving{opacity:0}
.media img.is-arriving.is-in{opacity:1;transition:opacity 280ms var(--ease)}
.media img.is-arriving.no-fade{transition:none}
.media img,
.media video,
.media canvas{
  width:100%;height:100%;
  object-fit:cover;
  display:block;
  pointer-events:none;
  user-select:none;
}

/* the card lifts first and the caption catches up — hence the delay on the
   way in, and none on the way out so it clears immediately */
.caption{
  margin-top:var(--gap);
  height:var(--caption-h);
  opacity:0;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  transition:opacity 200ms var(--ease) 0ms;
}
.slide.is-hot .caption,
.slide.is-open .caption{
  opacity:1;
  transition:opacity 320ms var(--ease) 120ms;   /* 120 behind the lift, was 200: the lift starts quicker now */
}

/* A CLOSED CARD ANSWERS THE POINTER WITH ITS PICTURE ONLY (2026-09-15). At
   rest the invisible caption, and the 20px gap above it, hang BELOW the card —
   so a pointer resting just under it turned the card hot, the card lifted,
   that strip rose with it and left the pointer, the card dropped back under
   the pointer, and round again: the jitter in Anthony's recording. Lifted or
   open, the caption sits inside the card's own box and is live again.
   Pointer devices only — a phone has no hover, and its captions are tapped. */
@media (hover:hover){
  .slide:not(.is-hot):not(.is-open):not(.is-closing) .head{pointer-events:none}
  .slide:not(.is-hot):not(.is-open):not(.is-closing) .media{pointer-events:auto}
}

.cap-text{display:flex;flex-direction:column;gap:10px;white-space:nowrap;min-width:0}
.cap-text .t{font-size:var(--fs-s)}   /* the name as the label, 14 (2026-09-25, as on the project page) */
.cap-text .s{font-size:var(--fs-s)}   /* both lines 14 on the feed card (his call, 2026-09-25); the project page head sets its own 14 / 16 — a card caption shows the one-line description (`line`), the type where there is none */

/* ---------- expanded case study ---------- */

/* lives inside .head so it rides up with the card and never affects the
   slide box; when open the head becomes its own scroll window */
.case{
  display:none;
  flex-direction:column;
  gap:var(--gap);
  margin-top:var(--gap);   /* 20, not 40, under the caption (2026-10-28 sweep: with the pictures 10 apart, 40 read loose) */
}
/* begins as the lift is settling so the synopsis arrives with the card
   rather than after a visible beat */
/* THE CONTENT RISES IN FROM BELOW THE WINDOW (2026-11-13, his idea): the write-up,
   Read more and the pictures travel up from a full screen-height below, out of
   view, on the card's own rise and just behind it, and are fully there as it
   settles; closing drops them back out of the bottom. (Was a 16px fade-up.) The
   stacked layout keeps its sideways reel (14-checkout.css). */
.slide.is-open .case{display:flex;animation:case-rise var(--case-rise) var(--case-rise-ease) 40ms backwards}
/* smoother (2026-11-13, his note): 70% of a screen, over 1.05s, easing in and settling long */
/* SMOOTHER AGAIN (2026-11-16, his note: "a little bit jaggy"): it came into view
   at ~31px a frame and then crawled for half a second. From 40vh on the card's
   curve it arrives at ~25px a frame and settles with the card. */
/* held at their start while the open is laid out (expand.js "laid out first") */
.slide.is-prep .case,
.slide.is-prep .shots{animation-play-state:paused}
@keyframes case-rise{from{transform:translateY(40vh)}to{transform:none}}
@keyframes case-drop{from{transform:none}to{transform:translateY(100vh)}}
@keyframes case-in{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}

/* Closing is the opening played backwards. The case arrives last on the way
   in, so it leaves first on the way out — it used to be display:none'd the
   instant the class dropped, which is why the close had nothing readable in
   it. Holding the 620ms duration matters just as much: without it the rule
   falls through to .is-hot's 340ms and the card drops twice as fast as it
   rose. */
.slide.is-closing .case{display:flex;animation:case-drop 480ms cubic-bezier(.55,0,.8,.3) forwards}
@keyframes case-out{from{opacity:1;transform:none}to{opacity:0;transform:translateY(16px)}}

/* stacked expands sideways, so the images only fade — a vertical slide would
   move them across the direction of travel */
@keyframes reel-in{from{opacity:0}to{opacity:1}}
@keyframes reel-out{from{opacity:1}to{opacity:0}}

.slide.is-closing .head{transition-duration:var(--card-open);transition-timing-function:var(--card-ease)}
.slide.is-closing .caption{transition:opacity 420ms var(--ease)}

/* The open card scrolls independently of the page and of the strip. The
   window is the FULL viewport height with the top inset carried as padding,
   so content runs edge to edge and passes under the header instead of being
   clipped against a visible white band. */
.slide.is-open .head{
  height:100vh;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-width:none;
}
.slide.is-open .head::-webkit-scrollbar{display:none}

.synopsis{display:flex;flex-direction:column;gap:var(--gap)}   /* 20 to Read more (was 40; 2026-10-28 sweep) */
.synopsis .body{font-size:var(--fs-s)}
.synopsis .btn{align-self:flex-start}

/* Buy — Get in touch's pill: black on the light theme, near-white on the dark,
   the one high-contrast control on a card or a project page */
.buy{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:var(--chip-h);
  padding:0 20px;
  border-radius:var(--chip-r);
  background-color:var(--contact-pill);
  color:var(--contact-ink);
  font-size:var(--fs-s);
  text-decoration:none;
  cursor:pointer;
  transition:background-color var(--hover) var(--ease);
}
@media (hover:hover){.buy:hover{background-color:var(--contact-pill-hover)}}.buy.is-pressed{background-color:var(--contact-pill-hover)}
/* beside the X, 10px apart like every header cluster */
.cap-actions{display:flex;align-items:center;gap:10px}
/* the share chip: the site's 12px glyph at 1px, swapped for a check while
   "copied" stands (a computer only; a phone opens its share sheet) */
.proj-share svg{width:12px;height:12px;fill:none;stroke:var(--ink);stroke-width:1;stroke-linecap:round;stroke-linejoin:round}
/* every glyph is a 12px box (the icon family pass, 2026-09-19): his copy glyph
   was 13 — half a pixel off the grid, and soft on a 1x screen */
.proj-share .copy-g{width:12px;height:12px}
/* the icon says what the button does: share where there is a share sheet to
   open (a phone), copy everywhere else — decided with the behaviour, in app.js */
.proj-share .share-g{display:none}
.can-share .proj-share .share-g{display:block}
.can-share .proj-share .copy-g{display:none}
/* on a card it belongs to the OPEN state — a closed card's hover caption
   carries only the plus */
/* BUY IS ON THE HOVER CAPTION TOO (2026-09-29, his call — it was open cards
   only, 2026-09-14): a product for sale shows Buy beside the plus the moment
   its card lifts, so nobody has to open the card to find it. */
.caption .buy{transition:background-color var(--hover) var(--ease)}

/* The reel only exists as a box on stacked, where the cover and the stack
   scroll sideways together. Here it must not be a box at all: display:contents
   hands its children straight to .zoom so the column lays out exactly as it did
   before the wrapper existed. The DOM now has the shots before the caption, so
   the column order has to be stated rather than inherited from the markup. */
.reel{display:contents}
.media{order:1}
.caption{order:2}
.case{order:3}
.shots{order:4}

/* the stack used to live inside .case and took its gap and its animation from
   it; both are reproduced here so the open still reads as one movement */
.shots{
  display:none;
  flex-direction:column;
  gap:var(--gap);
  margin-top:var(--gap);
}
.slide.is-open .shots{display:flex;animation:case-rise var(--case-rise) var(--case-rise-ease) 40ms backwards}
.slide.is-closing .shots{display:flex;animation:case-drop 480ms cubic-bezier(.55,0,.8,.3) forwards}

.shots img,
.shots video,
.shots canvas{
  width:100%;height:auto;
  display:block;
  border-radius:var(--radius);
}

/* A closed card opens a project; inside an open column the identical-looking
   image enlarges it instead. The badge (.cursor-tip) is what separates those
   two and names the action outright.

   THE ARROW HERE IS DELIBERATE. A closed card carries `cursor:pointer` and
   always has, with no flicker. Setting it inside an OPEN column — over the
   full-height scroller, with the rubber band transforming its contents — is
   what the cursor flicker tracked, and it is the one difference between the
   two cases. The affordance is carried by the badge instead, which is why the
   badge exists. Don't set a cursor here without testing for the flicker. */
.slide.is-open .media,
.slide.is-open .shots,
.part-shots{cursor:default}

/* Dragging the strip used to paint a text selection across whatever it passed
   over. pointerdown already preventDefaults, and this covers the rest. */
body.is-dragging,
body.is-dragging *{user-select:none;-webkit-user-select:none}

/* ---------- start a project ---------- */

/* The intro card, built with a project card's structure so it opens the same
   way — rising into a column with the brief scrolling inside it. `is-brief`
   switches off what makes no sense for a form. At rest it must look and behave
   exactly like the other surface cards: no hover lift, no caption. */
.slide.is-brief.is-hot:not(.is-open) .head{
  transform:translateY(calc(-1 * var(--open-top)));
}
.slide.is-brief:not(.is-open) .caption{opacity:0}
/* the card's own button has done its job once the column is open */
.brief-start{transition:opacity 260ms var(--ease),background-color var(--hover) var(--ease)}
.slide.is-brief.is-open .brief-start{opacity:0;pointer-events:none}

/* One question per group, 40px apart like the project page's blocks. Each
   group arrives with the case's own entrance, so revealing the next question
   reads as the column continuing rather than a form appearing. */
/* A journal entry's story, inside the card's own case — the same place a
   project's synopsis sits, at the same size, so an entry reads as one more
   thing in the feed rather than an article pasted into it. The measure is the
   card's, which is already about 45 characters on a laptop column. */
.jr-story{
  display:flex;
  flex-direction:column;
  gap:20px;
  font-size:var(--fs-s);
}
/* closed, the caption's date is the quiet half of the line, as a project's
   type is */
.slide.is-journal .caption .s{opacity:.55}
/* THE CARD IS THE CONTROL (Anthony, 2026-09-17). A journal entry has no "Read
   more" button: it lifts on hover, shows its name and date in the caption and
   offers the same "Open" badge a project card does, and a click anywhere on it
   opens the story — the strip's one gesture, applied to words. The copy fills
   the card now that nothing sits under it. */
/* THE STORY CLEARS THE FOOTER (Anthony, 2026-09-17). An entry ends flush with
   the bottom of the column, where a project's stack of images has the stream's
   own seam under it, and the last line sat right on the footer's band. One
   header's height of room under it, which is what the footer occupies. The card
   itself carries nothing where a message card's button would be: the date is in
   the caption a hover away, and twice was once too often. */
.slide.is-journal .case{padding-bottom:calc(var(--header-h) + 40px)}

.brief{
  display:flex;
  flex-direction:column;
  gap:var(--syn-gap);
}
.brief-step{
  display:none;
  flex-direction:column;
  gap:var(--gap);
  min-width:0;
}
.brief-step.is-on{
  display:flex;
  animation:case-in 480ms var(--ease) backwards;
}
.brief-q{font-size:16px}
.brief-opt{font-size:var(--fs-s);opacity:.4}

.brief-chips{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
/* The site's own pill. A picked answer turns dark — the contact block's colour,
   which always runs counter to the theme — so the choices you have made read
   down the column at a glance. */
.brief-chip{
  height:30px;
  padding:0 20px;
  border:0;
  border-radius:20px;
  background-color:var(--btn);
  color:var(--ink);
  font:inherit;
  font-size:var(--fs-s);
  cursor:pointer;
  transition:background-color var(--hover) var(--ease),color 220ms var(--ease);
}
@media (hover:hover){.brief-chip:hover{background-color:var(--btn-hover)}}.brief-chip.is-pressed{background-color:var(--btn-hover)}
.brief-chip.is-picked{
  background-color:var(--contact-pill);
  color:var(--contact-ink);
}@media (hover:hover){.brief-chip.is-picked:hover{
  background-color:var(--contact-pill);
  color:var(--contact-ink);
}}.brief-chip.is-picked.is-pressed{
  background-color:var(--contact-pill);
  color:var(--contact-ink);
}

/* Fields in the column's own light material rather than the contact card's
   dark one — this sits on the page, not inside a dark card. */
.brief-field{
  display:flex;
  flex-direction:column;
  gap:10px;
  font-size:var(--fs-s);
}
.brief-field input,
.brief-field textarea{
  width:100%;
  height:30px;
  padding:0 20px;
  border:1px solid transparent;
  border-radius:25px;
  background:var(--btn);
  color:var(--ink);
  font:inherit;
  font-size:var(--fs-s);
  transition:border-color var(--hover) var(--ease),background-color var(--hover) var(--ease);
}
.brief-field textarea{
  height:100px;
  padding:14px 20px;
  border-radius:20px;
  resize:none;
  line-height:1.45;
}
.brief-field input::placeholder,
.brief-field textarea::placeholder{color:var(--ink);opacity:.4}
.brief-field input:focus,
.brief-field textarea:focus{
  outline:none;
  border-color:color-mix(in srgb, var(--ink) 25%, transparent);
}
.brief-field [aria-invalid="true"]{border-color:var(--contact-error)}

.brief-send{
  align-self:flex-start;          /* sized to its label, like Send elsewhere */
  height:30px;
  padding:0 20px;
  border:0;
  border-radius:25px;
  background-color:var(--contact-pill);
  color:var(--contact-ink);
  font:inherit;
  font-size:var(--fs-s);
  cursor:pointer;
  transition:background-color var(--hover) var(--ease);
}
@media (hover:hover){.brief-send:hover{background-color:var(--contact-pill-hover)}}.brief-send.is-pressed{background-color:var(--contact-pill-hover)}
.brief-send[disabled]{opacity:.5;cursor:default}

.brief-note{font-size:var(--fs-s);color:var(--ink);opacity:.55}
.brief-note:empty{display:none}
.brief-note.is-error{color:var(--contact-error);opacity:1}

/* ---------- surface cards (intro / about / services / shop) ---------- */

.surface-card{
  width:var(--card-w);
  height:var(--card-h);
  background:var(--surface);
  border-radius:var(--radius);
  padding:var(--pad);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  transition:background 420ms var(--ease);
}
.surface-card .copy{display:flex;flex-direction:column;gap:20px}
.surface-card .h{font-size:20px}
.surface-card .b{font-size:var(--fs-s)}

.btn{
  align-self:flex-start;
  height:var(--ctl-h);   /* 36 on a laptop, 40 on a phone (Anthony, 2026-09-21: at 14px type 30 felt tight, 40 read too large) */
  padding:0 20px;
  border-radius:var(--ctl-r);
  background-color:var(--btn);
  border:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font:inherit;
  font-size:var(--fs-s);
  color:var(--ink);
  cursor:pointer;
  transition:background-color var(--hover) var(--ease);
}
@media (hover:hover){.btn:hover{background-color:var(--btn-hover)}}.btn.is-pressed{background-color:var(--btn-hover)}

/* KEYBOARD FOCUS (2026-09-19 review). Tabbing through the site showed almost
   nothing of where you were. A 1px ring in the ink, 3px out, following each
   control's own corner — and only for the keyboard: :focus-visible never
   matches a mouse click or a tap, so nobody using a pointer ever sees it.
   Fields keep their own focus edge (their border), so they are left out. */
:where(a, button, [role="button"], [tabindex]):focus-visible{
  outline:1px solid var(--ink);
  outline-offset:3px;
}
