/* ============================================================
   Motion — words, boxes, rows, the ask (shared by both cuts; see src/motion.js)
   ============================================================ */
/* ============================================================
   Words — masked words that rise in with a stagger
   ============================================================ */
.is-split .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .06em; margin-bottom: -.06em; }
.is-split .w > span { display: inline-block; transform: translateY(112%) rotate(.6deg); opacity: 0; transition: transform .7s cubic-bezier(.22,1,.36,1), opacity .45s ease; transition-delay: calc(var(--i, 0) * 26ms); }
.is-split.is-in .w > span { transform: none; opacity: 1; }
.js-reveal { opacity: 0; transform: translateY(18px); transition: opacity 1s ease, transform 1s cubic-bezier(.22,1,.36,1); }
.js-reveal.is-in { opacity: 1; transform: none; }

/* ============================================================
   Craft pass (2026-09-23) — WORDS. Three kinds of copy, three treatments, all after `document.fonts.ready` (pt1 §4):
   the hero line split once by lines; a section title through one mask; body copy never split (it fades, .js-reveal).
   ============================================================ */
.js-lines:not(.is-split), .js-mask:not(.is-masked) { opacity: 0; }                                  /* hidden until the face has loaded and the split is made — no jump, no reflow in view */
.js-lines .ln-m { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }   /* one mask per line; the padding keeps the descenders */
.js-lines .ln-m > span { display: block; transform: translateY(108%); opacity: 0; transition: transform 1s cubic-bezier(.22,1,.36,1), opacity .45s ease; transition-delay: calc(var(--i, 0) * 110ms); }
.js-lines.is-in .ln-m > span { transform: none; opacity: 1; }
.js-lines.is-done .ln-m { overflow: visible; }                                                     /* after the reveal the masks open: a resize may rewrap a line without clipping it */
.js-mask { overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.js-mask > .mk { display: block; transform: translateY(104%); transition: transform 1s cubic-bezier(.22,1,.36,1); }
.js-mask.is-in > .mk { transform: none; }
.js-mask.is-done { overflow: visible; }                                                            /* once the title is in, the mask opens: hover states and descenders are never clipped */
@media (prefers-reduced-motion: reduce) {
  .js-lines:not(.is-split), .js-mask:not(.is-masked) { opacity: 1; }                                /* nothing is split under reduced motion: the copy is simply there (same specificity as the hide rule above) */
  .js-lines .ln-m > span, .js-mask > .mk { transition: none !important; transform: none !important; opacity: 1 !important; }
}

/* big labels */
.block__label--xl { font-size: clamp(52px, 9.6vw, 150px); letter-spacing: -.03em; line-height: .92; }
.block__label--xl em { font-style: italic; font-weight: 400; color: var(--accent-soft); }
.block__sub { font-family: var(--sans); font-weight: 300; font-size: var(--t-body); color: var(--ink-dim); max-width: 38ch; margin-top: 18px; }
.block--cards .block__sub { margin-left: 0; margin-right: auto; text-align: left; }

/* ============================================================
   Boxes — fragments, revealed by clip-path from a corner
   ============================================================ */
.frags { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); max-width: var(--max); margin: 0 auto; align-items: end; }
.box { margin: 0; display: grid; gap: 12px; }
.box--a { grid-column: 1 / span 7; } .box--b { grid-column: 8 / span 5; }
.box--c { grid-column: 1 / span 4; } .box--d { grid-column: 5 / span 4; } .box--e { grid-column: 9 / span 4; }
.box__media { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: #000; border: 1px solid var(--ink-faint); clip-path: inset(100% 0 0 100%); transition: clip-path 1.3s cubic-bezier(.22,1,.36,1); }
.box--b .box__media, .box--d .box__media { aspect-ratio: 1 / 1; clip-path: inset(0 100% 100% 0); }
.box--c .box__media { aspect-ratio: 3 / 4; }
.js-box.is-in .box__media { clip-path: inset(0 0 0 0); }
.box__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.3s cubic-bezier(.22,1,.36,1); }   /* no transform at rest: a transformed video layer costs a compositor pass */
.box:hover .box__media video { transform: scale(1.06); }
.box figcaption { display: flex; justify-content: space-between; gap: 12px; opacity: 0; transform: translateY(6px); transition: opacity .7s ease .45s, transform 1s cubic-bezier(.22,1,.36,1) .45s; }
.js-box.is-in figcaption { opacity: 1; transform: none; }
.box__kind { color: var(--accent-soft); }
body.is-light .box__media { background: #ece8df; }

/* ============================================================
   Rows — the index: a name, one line, a status; hairlines between; no number, no ghost words, no peek (2026-09-23)
   Craft pass: on hover the three lift 3 px together and the row's hairline comes up — the hover reads with the sound off.
   ============================================================ */
.rows { max-width: var(--max); margin: 0 auto; border-top: 1px solid var(--ink-faint); }
.rowx { position: relative; display: grid; grid-template-columns: 1fr auto minmax(9ch, auto); align-items: baseline; gap: var(--gutter); padding: 24px 0 24px; border-bottom: 1px solid var(--ink-faint); transition: border-color .25s ease; }
.rowx__title { font-family: var(--serif); font-size: clamp(26px, 3.2vw, 46px); line-height: 1; letter-spacing: -.02em; color: var(--ink); }
.rowx__tag { justify-self: end; color: var(--ink-dim); font-family: var(--sans); font-size: 13px; white-space: nowrap; }
.rowx__status { justify-self: end; color: var(--ink-dim); font-size: 11px; white-space: nowrap; }
.rowx__status::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: currentColor; margin: 0 6px 1px 0; vertical-align: middle; opacity: .7; }
.rowx__title, .rowx__tag, .rowx__status { transition: transform .25s cubic-bezier(.22,1,.36,1), color .25s ease; }
.rowx:hover .rowx__title, .rowx:focus-within .rowx__title { color: var(--accent-soft); }   /* one hover: the name goes blue (and the glass tick, sound.js) */
.rowx:hover .rowx__title, .rowx:hover .rowx__tag, .rowx:hover .rowx__status,
.rowx:focus-within .rowx__title, .rowx:focus-within .rowx__tag, .rowx:focus-within .rowx__status { transform: translateY(-3px); }
.rowx:hover, .rowx:focus-within { border-bottom-color: var(--ink-dim); }
.rowx:hover .rowx__status, .rowx:focus-within .rowx__status { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .rowx__title, .rowx__tag, .rowx__status { transition: none; } .rowx:hover .rowx__title, .rowx:hover .rowx__tag, .rowx:hover .rowx__status { transform: none; } }

/* people numbered */
.person__num { color: var(--accent-soft); }

/* the ask */
.close { gap: 18px; }
.close__ask { font-family: var(--sans); font-weight: 300; font-size: clamp(18px, 1.6vw, 26px); color: var(--ink); opacity: .85; margin: 24px 0 0; }
.close__big { font-family: var(--serif); font-style: italic; font-size: clamp(64px, 11vw, 170px); line-height: .9; letter-spacing: -.03em; color: var(--ink); margin: 0; }
.close__line { margin-top: 6px; }

@media (max-width: 900px) {
  .box--a, .box--b, .box--c, .box--d, .box--e { grid-column: 1 / -1; }
  .box--b .box__media, .box--d .box__media, .box--c .box__media { aspect-ratio: 4 / 3; }      /* one rhythm on a phone */
  /* the index on a phone is its own composition: number and title on one line, the tag under it, the peek hidden */
  .rowx { grid-template-columns: 1fr auto; grid-template-areas: 'title title' 'tag status'; padding: 24px 0 18px; gap: 6px var(--gutter); }   /* the name alone on its line; the line and the status share the next */
  .rowx__title { grid-area: title; font-size: clamp(28px, 9vw, 40px); line-height: 1.02; }
  .rowx__tag { grid-area: tag; justify-self: start; white-space: normal; line-height: 1.5; font-size: 12px; }
  .rowx__status { grid-area: status; justify-self: end; align-self: baseline; }
  /* the people on a phone: portrait, name, bio, then the notes, each on its own */
  .team--founder .person { margin-top: 0; padding-top: 24px; }
  .founder__bio { font-size: 16px; max-width: none; }
  .block--cards .block__sub, body.noir .block--cards .block__sub { text-align: left; margin-left: 0; margin-right: auto; }
  .block__label--xl { font-size: clamp(44px, 14vw, 72px); }
  .close__big { font-size: clamp(56px, 17vw, 96px); }
  .is-split .w > span { transition-delay: calc(var(--i, 0) * 22ms); }                         /* shorter lines, quicker stagger */
}

/* studio: the About tag sits above its column instead of in the gutter */
.col--body .mono-tag { position: static; display: block; margin-bottom: 12px; }

/* ============================================================
   Decrypt + peek — the typographic hover
   ============================================================ */
.dc { display: inline-block; min-width: .32em; text-align: center; }
.dc.is-x { color: var(--accent-soft); font-family: var(--mono); font-size: .78em; vertical-align: .08em; }
.bar__links a .dc.is-x { font-size: .95em; vertical-align: 0; }

/* fragments: poster still, clip on hover */
.box__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.box__media video { opacity: 0; transition: opacity .45s ease; }
.box.is-live .box__media video { opacity: 1; }

/* work grid: spans from the markup; the poster scales on hover */
.frags--work .box { grid-column: span var(--span, 4); }
.frags--work .box__media { aspect-ratio: 16 / 10; clip-path: inset(100% 0 0 100%); }
.frags--work .box:nth-child(even) .box__media { clip-path: inset(0 100% 100% 0); }
.frags--work .js-box.is-in .box__media { clip-path: inset(0 0 0 0); }
.frags--work .box__poster { transition: transform 1.3s cubic-bezier(.22,1,.36,1); }
.frags--work .box:hover .box__poster { transform: scale(1.05); }
@media (max-width: 900px) { .frags--work .box { grid-column: 1 / -1; } }

.frags--work .box[style*='--span:12'] .box__media { aspect-ratio: 21 / 9; }   /* the wide closer */

/* captions read on the field: a hairline above, a quiet backing behind the words */
.frags--work .box figcaption { border-top: 1px solid var(--ink-faint); padding-top: 12px; margin-top: -2px; }
.frags--work .box figcaption .mono-tag { background: var(--bg); padding: 3px 6px 2px; margin-left: -6px; color: var(--ink); }
.frags--work .box figcaption .box__kind { color: var(--accent-soft); margin-left: 0; margin-right: -6px; }
body.is-light .frags--work .box figcaption .mono-tag { background: var(--bg); }


.box { position: relative; } .box__link, .rowx__link { position: absolute; inset: 0; z-index: 3; font-size: 0; }
.rowx { position: relative; }

/* depixelate: the still resolves out of big cells */
.depix { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; pointer-events: none; z-index: 2; transition: opacity .25s ease; }
.depix.is-done { opacity: 0; }

/* leaving for a case: the copy and chrome fade while the field splits (see initLeave) */
html.is-leaving main, html.is-leaving .bar, html.is-leaving .bar__brand, html.is-leaving .bar__cta, html.is-leaving .frame { opacity: 0 !important; transition: opacity .45s ease !important; }
html.is-leaving body::after { content: ''; position: fixed; inset: 0; z-index: 50; background: #05060a; opacity: 0; animation: leave-fade .46s ease forwards; pointer-events: none; }
@keyframes leave-fade { to { opacity: 1; } }

/* phones: nothing may be wider than the screen — captions wrap, grid children may shrink, the work boxes take the full row */
@media (max-width: 900px) {
  .frags { grid-template-columns: 1fr; }
  .frags .box { grid-column: 1 / -1 !important; min-width: 0; }
  .box figcaption { flex-wrap: wrap; }
  .box figcaption .mono-tag, .founder figcaption .mono-tag, .rowx .mono-tag { white-space: normal; line-height: 1.5; }
  .team > * { min-width: 0; }
}
