/* ─────────────────────────────────────────────────────────────────
   /projects v4

   Everything scales with the frame. The root font size is a fraction
   of the viewport width (1rem = 1.111vw on desktop, as measured on the
   reference), and every size below is in rem, vw or vh, so the page
   keeps its proportions at 1280, 1440, 1920 or 2560 wide. Phones and
   tablets get their own root, because a phone is a different frame,
   not a smaller desktop.

   Type: one family for structure (PP Neue Montreal: Book 400, Bold 700,
   no synthetic weights), Instrument Serif italic as a rare accent.
   ───────────────────────────────────────────────────────────────── */

@font-face { font-family: 'PP Neue Montreal'; src: url('https://cdn.prod.website-files.com/691d7c9f14d0280ebe2d4108/691d8a7b11b33d4b469b6f1c_ppneuemontreal-bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'PP Neue Montreal'; src: url('https://cdn.prod.website-files.com/691d7c9f14d0280ebe2d4108/691d8a7bc4e9f35b184ed616_ppneuemontreal-book.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('fonts/instrument-serif-italic.woff2') format('woff2'); font-style: italic; font-weight: 400; font-display: swap; }

:root {
  --paper: #E8E4DA; --paper-raised: #F4F2EC; --ink: #0B0B0C; --ink-raised: #141416;
  --sans: 'PP Neue Montreal', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --serif: 'Instrument Serif', 'Times New Roman', serif;

  /* Type steps (rem). Desktop values are the reference's vw sizes ÷ 1.111. */
  --t-mega: 14.625rem;   /* 16.25vw */
  --t-display: 6.125rem; /* 6.81vw  */
  --t-h2: 3.125rem;      /* 3.47vw  */
  --t-lede: 2.0625rem;   /* 2.29vw  */
  --t-body: 1rem;        /* 1.11vw  */
  --t-ui: max(0.75rem, 11.5px);     /* 0.83vw, floored for legibility */
  --t-micro: max(0.625rem, 10.5px); /* 0.69vw, floored for legibility */

  --cols: 8;
  --pad: 1rem;
  --bar-h: 64px;                     /* the site navbar, same as every other route */
  --nav-h: var(--bar-h);             /* sticky offsets clear the bar */
  --wm-h: 13vw;                      /* wordmark band (viewBox 1000 × 130) */
  --rule-h: 2.4375rem;               /* the header rule under it: 39px @1440, as the reference */
  --line: rgb(128 128 128 / 0.16);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html { font-size: calc(100vw / 90); -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
/* The site's scrollbar (src/index.css), so the bar centres on the same width. */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--sb-bg, #0B0B0C); }
::-webkit-scrollbar-thumb {
  background: var(--sb-th, rgba(255, 255, 255, 0.14));
  border-radius: 999px;
  border: 2px solid var(--sb-bg, #0B0B0C);
}
::-webkit-scrollbar-thumb:hover { background: var(--sb-th-h, rgba(255, 255, 255, 0.26)); }
/* Over a paper section the gutter takes the section's colour, so no dark strip runs down its edge. */
html.on-light { --sb-bg: var(--paper); --sb-th: rgb(11 11 12 / 0.2); --sb-th-h: rgb(11 11 12 / 0.36); background: var(--paper); }
@media (max-width: 1024px) { html { font-size: calc(100vw / 64); } :root { --cols: 4; } }
@media (max-width: 600px)  { html { font-size: calc(100vw / 26); } :root { --cols: 2; --t-display: 4rem; --t-h2: 2rem; --t-lede: 0.875rem; --t-body: 0.9375rem; --t-ui: max(0.75rem, 11.5px); } }

*, *::before, *::after { box-sizing: border-box; }
/* <picture> is only the WebP/fallback switch: it adds no box, so `.pn-media img` and `.tile-media img` lay out exactly as before. */
picture { display: contents; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-weight: 400; font-size: var(--t-body); line-height: 1.28; letter-spacing: -0.02em; -webkit-font-smoothing: antialiased; overflow-x: clip; transition: background-color .8s var(--ease), color .8s var(--ease); }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; letter-spacing: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: #C8FF00; color: #0B0B0C; }
:focus-visible { outline: 0.125rem solid currentColor; outline-offset: 0.1875rem; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; }
.dark { background: var(--ink); color: var(--paper); --acc: #C8FF00; }
.light { background: var(--paper); color: var(--ink); --acc: #4D6600; }

/* ── Wordmark band ─────────────────────────────────────────────── */
/* The site's own display face (Tr 3 A, as declared in src/index.css): wide and
   geometric, like the reference's logotype. Sized so its natural width is ~96%
   of the band, so the spacing opens the letters evenly across the frame. */
@font-face { font-family: 'DK Display'; src: url('https://cdn.prod.website-files.com/691d7c9f14d0280ebe2d4108/691d8ab14cbd4a1cf9811e7a_tr3a-Bold.woff2') format('woff2'); font-weight: 700; font-display: block; }
.wordmark { position: relative; z-index: 6; height: var(--wm-h); overflow: hidden; color: var(--ink); }
.wm-svg { display: block; width: 100%; height: auto; overflow: visible; }
.wm-svg text { font-family: 'DK Display', var(--sans); font-weight: 700; font-size: 178px; fill: currentColor; letter-spacing: 0; }
.foot-mark text { font-family: var(--sans); font-weight: 700; font-size: 186px; fill: currentColor; letter-spacing: 0; }
/* Under it, as on the reference's header: a hairline across the frame with a
   short tick on every grid column, and the plus at the left edge. */
.wm-rule { position: relative; z-index: 6; height: var(--rule-h); color: var(--ink);
  border-bottom: 1px solid color-mix(in srgb, currentColor 14%, transparent);
  background: repeating-linear-gradient(90deg, transparent 0 calc(100% / var(--cols) - 1px), color-mix(in srgb, currentColor 55%, transparent) calc(100% / var(--cols) - 1px) calc(100% / var(--cols))) 0 100% / 100% 0.375rem no-repeat; }
.foot-mark .fm { font-size: 168px; }

/* ── The site's navbar ─────────────────────────────────────────────
   A pixel copy of src/components/Nav.tsx so the site has one bar on
   every route. Deliberately in px, not the page's fluid rem: it must
   match the bar on / and /projects/<slug> exactly. */
@font-face { font-family: 'DK Site Book'; src: url('https://cdn.prod.website-files.com/691d7c9f14d0280ebe2d4108/691d8a7bc4e9f35b184ed616_ppneuemontreal-book.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/fonts/jetbrains-mono-latin.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }
.sitebar { position: fixed; inset: 0 0 auto; z-index: 200; height: var(--bar-h); border-bottom: 0.8px solid rgb(255 255 255 / 0.1); background: rgba(11, 11, 12, 0.86); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); font-family: 'DK Site Book', Inter, system-ui, sans-serif; letter-spacing: normal; }
.sb-inner { box-sizing: border-box; max-width: 1344px; height: 100%; margin: 0 auto; padding: 0 clamp(20px, 5vw, 64px); display: flex; align-items: center; justify-content: space-between; }
.sb-mark { display: inline-block; margin: -4px 0; padding: 4px 0; font-size: 15px; font-weight: 700; line-height: 1.5; text-transform: uppercase; letter-spacing: 0.12em; color: #F4F2EC; }
.sb-mark span { color: rgb(244 242 236 / 0.45); }
.sb-links { display: none; align-items: center; gap: 24px; margin: 0; padding: 0; list-style: none; }
.sb-links a, .sb-cta, .sb-panel span, .sb-panel-cta { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; font-weight: 700; line-height: 1.4; letter-spacing: 0.16em; text-transform: uppercase; }
.sb-links a { position: relative; display: block; padding: 8px 0; color: rgb(244 242 236 / 0.55); transition: color .2s; }
.sb-links a:hover, .sb-links a.is-on { color: #F4F2EC; }
.sb-links i { position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: #C8FF00; transform-origin: 0 50%; transform: scaleX(0); transition: transform .3s ease-out; }
.sb-links a:hover i, .sb-links a.is-on i { transform: scaleX(1); }
.sb-end { display: flex; align-items: center; gap: 12px; }
.sb-cta { display: none; padding: 10px 20px; border-radius: 9999px; background: #C8FF00; color: #0B0B0C; transition: background-color .2s; }
.sb-cta:hover { background: #fff; }
.sb-toggle { display: grid; place-items: center; width: 40px; height: 40px; border: 0.8px solid rgb(255 255 255 / 0.15); border-radius: 9999px; color: #F4F2EC; transition: background-color .2s; }
.sb-toggle:hover { background: rgb(255 255 255 / 0.1); }
.sb-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.sb-toggle .i-close, .sb-open .sb-toggle .i-menu { display: none; }
.sb-open .sb-toggle .i-close { display: block; }
@media (min-width: 768px) { .sb-links { display: flex; } .sb-toggle { display: none; } }
@media (min-width: 1024px) { .sb-links { gap: 36px; } .sb-cta { display: inline-flex; } }
.sb-panel { position: fixed; inset: 0; z-index: 190; display: flex; flex-direction: column; padding-top: var(--bar-h); background: #0B0B0C; color: #F4F2EC; font-family: 'DK Site Book', Inter, system-ui, sans-serif; letter-spacing: normal; opacity: 0; transition: opacity .3s cubic-bezier(0.16, 1, 0.3, 1); }
.sb-panel[hidden] { display: none; }
.sb-panel.is-in { opacity: 1; }
.sb-panel nav { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 0 clamp(20px, 5vw, 64px); }
.sb-panel ul { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.sb-panel li { opacity: 0; transform: translateY(14px); transition: opacity .5s cubic-bezier(0.16, 1, 0.3, 1), transform .5s cubic-bezier(0.16, 1, 0.3, 1); }
.sb-panel.is-in li { opacity: 1; transform: none; }
.sb-panel li:nth-child(2) { transition-delay: 45ms; } .sb-panel li:nth-child(3) { transition-delay: 90ms; } .sb-panel li:nth-child(4) { transition-delay: 135ms; } .sb-panel li:nth-child(5) { transition-delay: 180ms; }
.sb-panel li a { display: flex; align-items: baseline; justify-content: space-between; padding: 20px 0; border-bottom: 1px solid rgb(255 255 255 / 0.08); font-size: clamp(22px, 2.6vw, 32px); font-weight: 700; line-height: 1.15; letter-spacing: -0.025em; }
.sb-panel li span { color: rgb(244 242 236 / 0.35); }
.sb-panel-cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-top: 40px; padding: 16px 24px; border-radius: 9999px; background: #C8FF00; color: #0B0B0C; }

.wordmark { margin-top: var(--bar-h); }
main { margin-top: calc(-1 * (var(--wm-h) + var(--rule-h) + var(--bar-h))); }

/* ── Hero ──────────────────────────────────────────────────────── */
/* Height is set by app.js (--hero-len): the handoff at ~1 frame, the
   camera sequence 7.4 frames (the reference: 0.99 → 8.4), five project
   panels 7.4 frames, then one frame while the stage releases. */
.hero { position: relative; height: var(--hero-len, 1680svh); }
/* No negative margin here: a sticky element may overhang its container by its
   negative margin, which let the stage cover the next section for a frame. */
.stage { position: sticky; top: 0; height: 100svh; overflow: hidden; z-index: 1; background: var(--paper); }
.stage-grid i { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.stage-grid .g-a { left: 12.5%; }
.stage-grid .g-b { left: 62.5%; }
.diag { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.diag-line { stroke: #fff; stroke-width: 1; vector-effect: non-scaling-stroke; mix-blend-mode: difference; opacity: 0.2; }   /* as faint as the reference: a construction line, not a rule */
.shutter { position: absolute; left: 0; right: 0; height: 50%; overflow: hidden; }
.shutter-top { top: 0; }
.shutter-bot { top: 50%; }
.shutter i { position: absolute; inset: 0; background: #0B0B0C; transform-origin: 50% 100%; transform: scaleY(0); }
.gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; }
.statement { position: absolute; left: 0; width: 62.5%; top: 117.3%;   /* where app.js starts it (1.173 × the stage), so it never paints at the top first: that jump was a 0.13 layout shift */ margin: 0; text-align: right; font-size: var(--t-display); line-height: 0.88; letter-spacing: -0.05em; color: var(--ink); }
.st-line { display: block; }
/* Masked by the rotating line (app.js sets the gradient, size and position). */
.st-line, .hero-desc { -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.st-3 { color: #fff; mix-blend-mode: difference; }
.statement.handed .st-line { visibility: hidden; }

.hero-body { position: absolute; left: 0; right: 0; top: 0; z-index: 2; height: 100svh; display: grid; grid-template-columns: repeat(var(--cols), 1fr); pointer-events: none; }
.hero-body a { pointer-events: auto; }
.hero-caption { grid-column: 2 / span 2; align-self: start; margin: 50svh 0 0; font-size: var(--t-micro); line-height: 1.16; letter-spacing: -0.02em; }
/* The reference sets its small labels in a medium weight; the family here ships
   400 and 700 only, so a hairline stroke brings 400 up to that colour on the page. */
.hero-caption, .hero-scroll span { -webkit-text-stroke: 0.012em currentColor; }
.hero-desc { grid-column: 6 / span 2; align-self: start; margin: 49.2svh 0 0; font-size: var(--t-lede); line-height: 1.08; letter-spacing: -0.03em; }
.hero-desc span { display: inline-block; }
.hero-scroll { position: absolute; left: 62.5%; bottom: 1rem; display: flex; align-items: flex-end; gap: 0.5rem; font-size: var(--t-micro); line-height: 1; }
.hero-scroll i { display: block; width: 1px; height: 8.7svh; background: currentColor; transform-origin: 50% 100%; }

/* ── Fixed furniture ───────────────────────────────────────────── */
.link-line::after { content: ""; position: absolute; inset: -0.75rem -0.5rem; }
.link-line { position: relative; }

.anchor { position: absolute; left: 0; width: 1px; height: 1px; pointer-events: none; }
.link-line { position: relative; display: inline-flex; align-items: center; gap: 0.4rem; font-size: var(--t-ui); padding-bottom: 0.25rem; border-bottom: 1px solid currentColor; white-space: nowrap; }
.link-line i { font-style: normal; transition: transform .6s var(--ease); }
.link-line:hover i { transform: translateX(0.25rem); }

/* ── Selected: full-frame panels on the hero stage ─────────────────
   Each opens from a centred square (the box). The first one starts at
   the exact square the WebGL floor occupied, so the handoff is seamless. */
.panels { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.panel { position: absolute; inset: 0; visibility: hidden; color: #F4F2EC; }
.panel.on { visibility: visible; }
.pn-media { position: absolute; left: 50%; top: 50%; width: 100%; height: 100%; transform: translate(-50%, -50%); overflow: hidden; background: #0B0B0C; }
/* Edge fades while the cover is still a square in the box; they lift as it grows. */
.pn-grad { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, #0e0e0e 0%, rgb(14 14 14 / 0) 32%, rgb(14 14 14 / 0) 68%, #0e0e0e 100%), linear-gradient(180deg, #0e0e0e 0%, rgb(14 14 14 / 0) 32%, rgb(14 14 14 / 0) 68%, #0e0e0e 100%); }
.pn-media img { position: absolute; left: 50%; top: 50%; max-width: none; transform-origin: 50% 50%; will-change: transform, filter; }
/* Ink under the left column, where the copy sits; the devices in the right half stay clear. */
.pn-shade { position: absolute; inset: 0; opacity: 0; background:
  linear-gradient(90deg, rgb(11 11 12 / 0.78) 0%, rgb(11 11 12 / 0.55) 38%, rgb(11 11 12 / 0.12) 56%, rgb(11 11 12 / 0) 70%),
  linear-gradient(0deg, rgb(11 11 12 / 0.35) 0%, transparent 30%); }
/* The panels show websites: the name and the copy share the left column, the devices own the right half. */
.pn-name { position: absolute; left: 12.5%; top: 26svh; max-width: 34%; margin: 0; opacity: 0; font-weight: 400; font-size: calc(var(--t-display) * 0.8); line-height: 0.9; letter-spacing: -0.05em; text-wrap: balance; }
.pn-name > span { display: block; overflow: hidden; padding-bottom: 0.08em; }
.pn-name > span > span { display: block; }
.pn-body { position: absolute; left: 12.5%; top: 52svh; width: 28%; pointer-events: auto; opacity: 0; }
.pn-body .w { display: inline-block; transform-origin: 0 100%; }
.pn-proof, .pn-link { transform-origin: 0 100%; }
.pn-meta { margin: 0 0 0.9rem; font-size: var(--t-micro); color: rgb(244 242 236 / 0.62); }
.pn-sum { margin: 0; font-size: var(--t-body); line-height: 1.28; }
.pn-proof { margin: 1.4rem 0 0; display: flex; align-items: baseline; gap: 0.75rem; font-size: var(--t-ui); color: rgb(244 242 236 / 0.7); }
.pn-proof b { font-weight: 400; font-size: var(--t-lede); line-height: 1; letter-spacing: -0.04em; color: #C8FF00; }
.pn-link { margin-top: 1.6rem; }
.pn-link-2 { margin-left: 2rem; }   /* the overview, beside "Visit <site>" on a website panel */

/* ── Approach ("I" + four verbs) ───────────────────────────────────
   Measured on the reference at 1440×900: the big word 16.25vw, held at the
   frame's middle; its caption centred on the 37.5% line; the verbs stacked
   from the 49% line, each starting half a frame to the right and sliding home
   (power1.out over 0.5, 0.1 apart) across the section's scroll. */
.approach { position: relative; overflow: clip; padding-bottom: 10.8rem; }
.ap-title-wrap { position: absolute; left: 0; top: 0; width: 49%; height: 50.9rem; pointer-events: none; }   /* as tall as the four verbs: it holds only while they pass */
.ap-title-inner { position: sticky; top: calc(50svh - 6.375rem); }
.ap-big { display: block; margin-left: 0.5rem; font-size: var(--t-mega); line-height: 0.87; letter-spacing: -0.1em; }
.ap-wrap { margin-left: 48.9%; }
.ap-words { margin: 0; }
.ap-word { display: block; font-size: var(--t-mega); line-height: 0.87; letter-spacing: -0.1em; text-transform: uppercase; white-space: nowrap; will-change: transform; }
.ap-desc { margin: 10.7rem 0 0 0.5rem; }
.ap-lede { margin: 0; max-width: 20.5rem; font-size: var(--t-lede); line-height: 1.08; letter-spacing: -0.03em; }
.ap-text { margin: 2rem 0 0; max-width: 18.25rem; font-size: var(--t-body); line-height: 1.28; }
.ap-desc > * { transform-origin: 0 100%; }

/* ── Disciplines ("I build") ───────────────────────────────────── */
.disc { position: relative; }
/* "I build" pins with the ticker: the title, the names directly under it, then the copy and the cover window. */
.disc-title { flex: none; margin: 0 0 0 calc(var(--pad) - 0.05em); font-weight: 400; font-size: var(--t-mega); line-height: 0.87; letter-spacing: -0.07em; white-space: nowrap; }
.disc-title span { display: inline-block; }
.disc-track-wrap { position: relative; height: 650svh; }
.disc-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; display: flex; flex-direction: column; padding: 5.5rem 0 2.5rem; box-sizing: border-box; }
.disc-names { flex: none; position: relative; margin: 1.6rem 0 0; padding: 0 0 0 50vw; list-style: none; display: flex; will-change: transform; }
.disc-row { position: relative; flex: 1 1 auto; min-height: 0; max-height: 31vw; margin-top: 1.6rem; }
.disc-names li { flex: 0 0 37.5vw; }
.disc-names button { font-size: var(--t-h2); line-height: 1; letter-spacing: -0.04em; white-space: nowrap; opacity: 0.22; transition: color .3s; }
.disc-window { position: absolute; left: 50%; top: 0; width: 22vw; height: 100%; overflow: hidden; background: #ECE7DB; }
.disc-strip { display: flex; height: 100%; will-change: transform; }
.disc-strip .dc { flex: 0 0 22vw; width: 22vw; height: 100%; overflow: hidden; }
.disc-strip .dc-art { display: block; width: 100%; height: 100%; transform-origin: 50% 50%; will-change: transform; }
.disc-copy { position: absolute; left: var(--pad); top: 0; width: 25vw; }
.disc-copy p { margin: 0; font-size: var(--t-body); line-height: 1.28; }
.disc-copy .link-line { margin-top: 1.25rem; }

/* ── All projects: masonry ─────────────────────────────────────── */
.works { position: relative; padding: 8vw var(--pad) 10vw; }
.works-head { display: grid; grid-template-columns: repeat(var(--cols), 1fr); align-items: end; margin-bottom: 3vw; }
.works-title { grid-column: 1 / span 3; margin: 0; font-weight: 400; font-size: var(--t-h2); line-height: 0.95; letter-spacing: -0.04em; }
.works-title sup { font-size: var(--t-micro); letter-spacing: 0; vertical-align: top; opacity: 0.5; }
.masonry { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; align-items: start; }
@media (min-width: 1025px) { .masonry { overflow: clip; } }   /* the rising columns are cut at the strip's edges */
.m-col { display: flex; flex-direction: column; gap: 2.25rem; will-change: transform; }
.tile a { display: block; cursor: none; }
.tile-media { position: relative; overflow: hidden; background: #141416; }
.tile-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.001); transition: transform 1.4s var(--ease); }
.tile a:hover .tile-media img { transform: scale(1.05); }
.tile-cap { display: grid; grid-template-columns: 2.25rem 1fr auto; align-items: baseline; gap: 0.5rem; padding-top: 0.6rem; font-size: var(--t-ui); }
.tile-n { opacity: 0.45; font-variant-numeric: tabular-nums; }
.tile-t { font-size: var(--t-body); letter-spacing: -0.02em; }
.tile-m { opacity: 0.45; text-align: right; }
.tile-new { margin-left: 0.4rem; color: var(--acc); font-size: var(--t-micro); }

/* Index (accordion) */
.cursor { position: fixed; left: 0; top: 0; z-index: 90; width: 6rem; height: 6rem; margin: -3rem 0 0 -3rem; border-radius: 50%; background: #C8FF00; color: #0B0B0C; display: grid; place-items: center; font-size: var(--t-micro); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; pointer-events: none; transform: scale(0); opacity: 0; }

/* ── Close: Working / Worldwide, then the plus opens to paper ──── */
.close { position: relative; height: 260svh; }
.close-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.close-words { position: absolute; left: var(--pad); right: var(--pad); top: 50%; margin: 0; display: flex; justify-content: center; align-items: center; gap: 0.25em; transform: translateY(-50%); font-weight: 400; font-size: var(--t-display); line-height: 1; letter-spacing: -0.04em; white-space: nowrap; }
/* The two words start large and together in the middle, then part to the edges
   at 50/98 of the size while two lines open from the centre to the quarter lines. */
.close-words span { display: inline-block; will-change: transform; }
.cw-a { transform-origin: 0 50%; } .cw-b { transform-origin: 100% 50%; }
.cl-line { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: color-mix(in srgb, currentColor 16%, transparent); opacity: 0; will-change: transform; }
.close-note { position: absolute; left: 12.5%; bottom: 2.5rem; margin: 0; font-size: var(--t-ui); line-height: 1.3; opacity: 0.7; }
/* Idea → Production: a line through the four steps, then the line opens to paper. */
.pipe { position: absolute; left: 25%; width: 50%; top: 50%; height: 0; }
.pipe-line { position: absolute; left: 0; top: -0.5px; width: 100%; height: 1px; background: currentColor; opacity: 0.55; transform: scaleX(0); transform-origin: 0 50%; will-change: transform; }
.pipe-n { position: absolute; left: calc(var(--p) * 100%); top: 0; display: flex; flex-direction: column; align-items: center; gap: 0.3rem; padding-top: 1.4rem; transform: translateX(-50%); font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--t-micro); letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; opacity: 0.25; transition: opacity .5s var(--ease); }
.pipe-n b { font-weight: 700; opacity: 0.6; }
.pipe-n::before { content: ''; position: absolute; left: 50%; top: -0.3125rem; width: 0.625rem; height: 0.625rem; margin-left: -0.3125rem; box-sizing: border-box; border: 1px solid currentColor; background: var(--ink); transform: rotate(45deg); transition: background-color .5s var(--ease); }
.pipe-n.on { opacity: 1; }
.pipe-n.on::before { background: currentColor; }
.close-open { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: var(--paper); opacity: 0; transform: scale(0.5, 0.001); transform-origin: 50% 50%; will-change: transform; }

/* ── Let's talk + wordmark ─────────────────────────────────────── */
.talk { position: relative; min-height: 100svh; display: flex; flex-direction: column; padding: calc(var(--bar-h) + 1.5rem) var(--pad) 2.75rem; }
.talk > * { position: relative; }
/* It overlaps the close's last screen, so the moment the close's plane has filled the frame with
   paper, Let's talk is already on it: no frame of bare paper between them, in either direction.
   The overlapping screen is transparent (the plane shows through), and paper below it. Until the
   plane is full the section takes no clicks, so the close's frame is what the pointer meets. */
.talk { margin-top: -100svh; z-index: 2; }
.talk.light { background: linear-gradient(to bottom, transparent 100svh, var(--paper) 100svh); }
.talk:not(.is-on) { pointer-events: none; }
/* Its entrance: the headline rises from behind its baselines, the rest follows in reading order
   (--i is set in app.js); stepping back out is quicker and all at once. */
.talk .tl > * { transform: translateY(110%); transition: transform 1.5s var(--ease) calc(var(--i, 0) * 90ms); }
.talk .rv { opacity: 0; transform: translateY(20px) rotate(1.5deg); transform-origin: 0 100%; transition: opacity 1s var(--ease) calc(150ms + var(--i, 0) * 45ms), transform 1.4s var(--ease) calc(150ms + var(--i, 0) * 45ms); }
.talk.is-on .tl > * { transform: none; }
.talk.is-on .rv { opacity: 1; transform: none; }
.talk:not(.is-on) .tl > *, .talk:not(.is-on) .rv { transition-duration: .35s; transition-delay: 0s; }
/* The section's rules belong to it too: they draw in with it, and are gone while the plane is still moving. */
.talk-top, .talk-paths ol, .talk-steps { transition: border-color 1s var(--ease) .1s; }
.talk:not(.is-on) .talk-top, .talk:not(.is-on) .talk-paths ol, .talk:not(.is-on) .talk-steps { border-color: transparent; transition-duration: .3s; transition-delay: 0s; }
@media (prefers-reduced-motion: reduce) {
  .talk .tl > *, .talk .rv { transform: none !important; }
  .talk .tl > * { opacity: 0; transition: opacity .3s; }
  .talk.is-on .tl > * { opacity: 1; }
}
/* Top rail: where you are. */
.talk-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-bottom: 1.1rem; border-bottom: 1px solid color-mix(in srgb, currentColor 14%, transparent); }
.talk-k { margin: 0; display: flex; gap: 0.6rem; font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--t-micro); letter-spacing: 0.12em; text-transform: uppercase; }
.talk-k span:not(:first-child) { opacity: 0.45; }

/* The lead (cols 1–5) and the four ways in (cols 6–8). */
.talk-grid { flex: 1; display: grid; grid-template-columns: repeat(var(--cols), 1fr); column-gap: 1rem; align-items: center; padding: 3.5rem 0; }
.talk-lead { grid-column: 1 / span 5; }
.talk-title { margin: 0; font-weight: 400; font-size: 5.25rem; line-height: 0.94; letter-spacing: -0.055em; }
.talk-title .tl { display: block; overflow: hidden; padding-bottom: 0.08em; }
.talk-title .tl > * { display: block; }
.talk-title em { font-family: var(--serif); font-style: italic; letter-spacing: -0.02em; font-size: 1.06em; }
.talk-lede { margin: 2rem 0 0; max-width: 33rem; font-size: 1.1875rem; line-height: 1.42; letter-spacing: -0.01em; opacity: 0.72; }
.talk-cta { margin-top: 2.5rem; display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 1.5rem; }
/* The primary action: ink on paper, and on hover the label rolls up as the arrow runs on. */
.talk-btn { position: relative; display: inline-flex; align-items: center; gap: 1.1rem; height: max(3.75rem, 52px); padding: 0 0.6rem 0 1.75rem; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: max(1rem, 15px); overflow: hidden; isolation: isolate; transition: transform .6s var(--ease); }
.talk-btn::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: #C8FF00; transform: translateY(101%); transition: transform .6s var(--ease); }
.talk-btn:hover::before, .talk-btn:focus-visible::before { transform: translateY(0); }
.talk-btn:hover, .talk-btn:focus-visible { color: #0B0B0C; }
.talk-btn-t { display: block; overflow: hidden; line-height: 1.3; }
.talk-btn-t > span { position: relative; display: block; transition: transform .6s var(--ease); }
.talk-btn-t > span::after { content: attr(data-t); position: absolute; left: 0; top: 100%; }
.talk-btn:hover .talk-btn-t > span, .talk-btn:focus-visible .talk-btn-t > span { transform: translateY(-100%); }
.talk-btn i { display: grid; place-items: center; width: max(2.6rem, 38px); height: max(2.6rem, 38px); border-radius: 50%; background: var(--paper); color: var(--ink); font-style: normal; transition: transform .6s var(--ease); }
.talk-btn:hover i { transform: rotate(-45deg); }
.talk-note { font-size: var(--t-micro); opacity: 0.5; max-width: 18rem; line-height: 1.4; }

.talk-paths { grid-column: 6 / span 3; align-self: center; }
.talk-label { margin: 0 0 0.9rem; font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--t-micro); letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.5; }
.talk-paths ol { margin: 0; padding: 0; list-style: none; border-top: 1px solid color-mix(in srgb, currentColor 16%, transparent); }
.talk-paths li { border-bottom: 1px solid color-mix(in srgb, currentColor 16%, transparent); }
.talk-paths a { position: relative; display: grid; grid-template-columns: 2.25rem 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: 0.5rem; padding: 1.15rem 0.25rem; isolation: isolate; transition: padding .6s var(--ease), color .4s var(--ease); }
.talk-paths a::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--ink); transform: scaleY(0); transform-origin: 50% 100%; transition: transform .6s var(--ease); }
.talk-paths a:hover, .talk-paths a:focus-visible { color: var(--paper); padding-inline: 1rem; }
.talk-paths a:hover::before, .talk-paths a:focus-visible::before { transform: scaleY(1); }
.talk-paths b { grid-row: 1 / span 2; font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--t-micro); font-weight: 400; letter-spacing: 0.1em; opacity: 0.45; }
.tp-t { font-size: 1.375rem; line-height: 1.1; letter-spacing: -0.03em; }
.tp-d { grid-column: 2; font-size: var(--t-ui); opacity: 0.55; margin-top: 0.3rem; }
.talk-paths a i { grid-column: 3; grid-row: 1 / span 2; font-style: normal; font-size: 1.25rem; transform: translateX(-0.4rem); opacity: 0.35; transition: transform .6s var(--ease), opacity .4s; }
.talk-paths a:hover i, .talk-paths a:focus-visible i { transform: translateX(0); opacity: 1; color: #C8FF00; }

/* What happens next: three steps on one rule. */
.talk-steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent); }
.talk-steps li { display: grid; grid-template-columns: 2.25rem 1fr; column-gap: 0.5rem; padding: 1.4rem 1.5rem 0.25rem 0; }
.talk-steps li + li { padding-left: 1.5rem; border-left: 1px solid color-mix(in srgb, currentColor 14%, transparent); }
.talk-steps b { grid-row: 1 / span 2; font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--t-micro); font-weight: 400; letter-spacing: 0.1em; opacity: 0.45; padding-top: 0.2rem; }
.ts-t { font-size: var(--t-body); letter-spacing: -0.01em; }
.ts-d { margin-top: 0.35rem; font-size: var(--t-ui); line-height: 1.45; opacity: 0.55; max-width: 24rem; }

.pill { display: inline-flex; align-items: center; gap: 0.45rem; min-height: max(2.25rem, 36px); padding: 0.5rem 0.875rem; border: 1px solid currentColor; border-radius: 0.625rem; font-size: var(--t-ui); text-transform: uppercase; letter-spacing: 0; line-height: 1; }
.pill-solid { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ── Tablet (601–1024) ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  /* The two lines sit either side of the diagonal, as on desktop: the description up and to the
     right (the half the line's mask keeps), the caption down and to the left. */
  .hero-caption { grid-column: 2 / span 2; grid-row: 1; margin-top: 58svh; }
  .hero-desc { grid-column: 3 / -1; grid-row: 1; justify-self: end; margin: 28svh var(--pad) 0 0; text-align: right; font-size: 2.25rem; }
  .pn-name { left: var(--pad); top: auto; bottom: calc(14svh + 9rem); max-width: calc(100% - 2 * var(--pad)); }
  .pn-body { left: var(--pad); top: auto; bottom: 7svh; width: 60%; }
  .disc-names li { flex-basis: 56vw; }
  .disc-row { max-height: 40vw; }
  .disc-window { width: 30vw; }
  .disc-strip .dc { flex-basis: 30vw; width: 30vw; }
  .disc-copy { width: 40vw; }
  .works-title { grid-column: 1 / -1; margin-bottom: 1.5rem; }
  .masonry { grid-template-columns: repeat(2, 1fr); }
  .m-col:nth-child(3) { display: none; }
  .talk-grid { row-gap: 3.5rem; align-content: center; }
  .talk-lead, .talk-paths { grid-column: 1 / -1; }
  .talk-title { font-size: 6rem; }
  .talk-lede { font-size: 1.5rem; max-width: 46rem; }
  .tp-t { font-size: 1.75rem; }
  .talk-steps li { padding-right: 1rem; } .talk-steps li + li { padding-left: 1rem; }
  .ap-title-wrap { position: static; width: auto; height: auto; padding: 10vw var(--pad) 0; }
  .ap-title-inner { position: static; margin: 0; }
  .ap-big { margin: 0; font-size: 9rem; }
  .ap-wrap { margin: 6vw var(--pad) 0; }
  .ap-word { font-size: 8rem; }
  .ap-desc { margin: 6vw 0 0; }
}

/* ── Phone (≤600) ──────────────────────────────────────────────── */
@media (max-width: 600px) {
  .hero-body { grid-template-columns: 1fr; padding: 0 var(--pad); }
  .hero-caption { position: absolute; left: 50%; bottom: 1rem; margin: 0; padding-left: 0.5rem; font-size: var(--t-ui); grid-column: auto; }
  .hero-desc { grid-column: 1; justify-self: end; margin: 30svh 0 0; text-align: right; font-size: 1.25rem; line-height: 1.12; }
  .hero-scroll { display: none; }
  .stage-grid .g-a { left: 50%; } .stage-grid .g-b { display: none; }
  .statement { width: 100%; padding-right: var(--pad); }
  .pn-name { bottom: calc(10svh + 12.5rem); font-size: 3.25rem; }
  .pn-body { bottom: 5svh; width: calc(100% - 2 * var(--pad)); }
  .pn-sum { font-size: 0.9375rem; }
  /* On a phone the copy covers the lower half of the picture: give it a floor of ink to sit on. */
  .pn-shade { background: linear-gradient(0deg, rgb(11 11 12 / 0.94) 0%, rgb(11 11 12 / 0.86) 42%, rgb(11 11 12 / 0.25) 70%, rgb(11 11 12 / 0.15) 100%); }
  .disc-stage { padding-top: 5rem; }
  .disc-title { font-size: 6rem; }
  .disc-names { margin-top: 1rem; padding-left: var(--pad); }
  .disc-names li { flex-basis: 80vw; }
  .disc-names button { font-size: 2.25rem; }
  .disc-row { flex: none; height: min(84vw, 46svh); max-height: none; margin-top: 1rem; }
  .disc-window { left: var(--pad); width: 60vw; }
  .disc-strip .dc { flex-basis: 60vw; width: 60vw; }
  .disc-copy { top: calc(100% + 1.25rem); width: calc(100% - 2 * var(--pad)); }
  .works { padding: 16vw var(--pad) 18vw; }
  .masonry { grid-template-columns: 1fr; }
  .m-col:nth-child(2) { display: none; }
  .m-col { gap: 2.5rem; }
  .close-words { flex-direction: column; justify-content: space-between; top: 18svh; bottom: 18svh; transform: none; font-size: 2.5rem; }
  .ap-title-wrap { position: static; width: auto; height: auto; padding: 16vw var(--pad) 0; }
  .ap-title-inner { position: static; margin: 0; }
  .ap-big { margin: 0; font-size: 7rem; }
  .ap-wrap { margin: 10vw var(--pad) 0; }
  .ap-word { font-size: 4.75rem; }
  .ap-desc { margin: 10vw 0 0; }
  .approach { padding-bottom: 18vw; }
    .close-note { left: var(--pad); }
  .pipe { left: 14%; width: 72%; }
  .talk { padding-bottom: 3rem; }
  .talk-top { flex-direction: column; align-items: flex-start; gap: 0.9rem; }
    .talk-grid { padding: 2.75rem 0; row-gap: 3rem; }
  .talk-title { font-size: 2.75rem; letter-spacing: -0.05em; }
  .talk-lede { font-size: 1rem; margin-top: 1.25rem; }
  .talk-cta { margin-top: 1.75rem; }
  .talk-btn { width: 100%; justify-content: space-between; }
  .tp-t { font-size: 1.2rem; }
  .talk-steps { grid-template-columns: 1fr; }
  .talk-steps li, .talk-steps li + li { padding: 1.1rem 0; border-left: 0; border-bottom: 1px solid color-mix(in srgb, currentColor 14%, transparent); }
}
/* ── Tablet, portrait (601–1024 wide, taller than wide) ─────────────
   The frame has height to spare, so the "I build" card grows to fill it,
   keeping the card's own 740 × 1040 proportion. */
@media (min-width: 601px) and (max-width: 1024px) and (orientation: portrait) {
  .disc-row { flex: none; height: 62vw; max-height: none; }
  .disc-window { width: 44vw; }
  .disc-strip .dc { flex-basis: 44vw; width: 44vw; }
  .disc-copy { width: calc(50vw - 3 * var(--pad)); }
}

/* ── Phone, landscape (short frames up to 1024 wide) ──────────────────
   A phone on its side is a short, wide frame: sizes follow its height
   (1rem = 1/30 of it), not its width, or the type set for a tablet
   outgrows a 375px-tall screen. */
@media (max-width: 1024px) and (max-height: 500px) and (orientation: landscape) {
  html { font-size: calc(100vh / 30); }
  :root { --t-display: 5rem; }
  .hero-caption { grid-column: 1 / span 2; align-self: end; margin: 0 0 1.25rem var(--pad); }
  .hero-desc { grid-column: 3 / -1; align-self: end; margin: 0 var(--pad) 1.25rem 0; font-size: 1.5rem; }
  .hero-scroll { display: none; }
  .pn-name { top: calc(var(--bar-h) + 5svh); bottom: auto; max-width: 50%; font-size: 3.25rem; }
  .pn-body { top: auto; bottom: 5svh; width: 46%; }
  .pn-shade { background: linear-gradient(90deg, rgb(11 11 12 / 0.86) 0%, rgb(11 11 12 / 0.72) 44%, rgb(11 11 12 / 0.2) 60%, rgb(11 11 12 / 0) 74%); }
  .pn-meta { margin-bottom: 0.6rem; }
  .pn-proof { margin-top: 0.9rem; }
  .pn-link { margin-top: 1rem; }
  .disc-stage { padding: calc(var(--bar-h) + 0.75rem) 0 1rem; }
  .disc-title { font-size: 5.5rem; }
  .disc-names { margin-top: 0.5rem; }
  .disc-names button { font-size: 1.75rem; }
  .disc-row { flex: 1 1 auto; max-height: none; margin-top: 0.75rem; }
  .disc-window { width: 26vw; }
  .disc-strip .dc { flex-basis: 26vw; width: 26vw; }
  .disc-copy { width: calc(50vw - 3 * var(--pad)); }
  .ap-big { font-size: 8rem; }
  .ap-word { font-size: 6.5rem; }
  .close-words { font-size: 4.5rem; }
  .talk-title { font-size: 4.25rem; }
  .talk-lede { font-size: 1.125rem; }
}
@media (hover: none), (pointer: coarse) { .tile a { cursor: pointer; } .cursor { display: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .tile a { cursor: pointer; } .cursor { display: none; }
}

/* Contact handoff (app.js): a hairline across the middle that opens into an ink plane, which the home page's contact section takes over. Above everything, including the navbar. */
.handoff { position: fixed; inset: 0; z-index: 1000; pointer-events: auto; cursor: progress; }
.ho-plane { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: #0B0B0C; opacity: 0; transform-origin: 50% 50%; will-change: transform; }
.ho-line { position: absolute; left: 0; top: 50%; width: 100%; height: 1px; margin-top: -0.5px; transform: scaleX(0); transform-origin: 50% 50%; will-change: transform; }
