/* The story page (index.html): layout, screens, motion styles. Moved out of the page so it caches. */
/* Layout: one long scroll stage of screens; most are a viewport tall, the film scenes are pinned and much taller. */
:root {
  --content: min(1180px, max(640px, calc((100vh - 300px) * 16 / 9)));
  --paper: #F5F5F2;
  --ink: #141414;
  --fg: #141414;
  --bg: #F5F5F2;
  --muted: #6E6D69;
  --ph: #E4E3DE;
  --ph-line: #C6C4BD;
  --note: #2E5BFF;
  --fill: #FFE9A8;
  --fill-fg: #4A3A00;
  --panel: #FFFFFF;
  --rule: #D8D6D0;
  --dark-bg: #111111;
  --dark-fg: #EDEDEA;
  --dark-ph: #1F1F1E;
  --dark-line: #3A3936;
  --on-image: #F7EFE2;
  --paper-page: #EFE4CF;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
}
/* Always light: the site does not follow the system's dark mode. Dark screens are designed in, not switched. */
:root { color-scheme: light; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; /* no browser default 8px frame around the story */
  background: var(--bg); color: var(--fg);
  font-family: var(--sans); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--note); outline-offset: 3px; }

/* Header */
.top {
  position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 14px;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
  background: none; mix-blend-mode: difference; /* white text turns black over light sections and stays white over dark ones */
}
/* Over photographs and films the blend would tint the text, so it stays plain white with a soft shadow. */
.top.on-photo { mix-blend-mode: normal; }
.top.on-photo .brand, .top.on-photo .nav a { text-shadow: 0 1px 14px rgba(0, 0, 0, .65); }
.brand { font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; color: #fff; white-space: nowrap; }
.nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.nav a, .nav button {
  font-size: 13px; font-weight: 500; text-decoration: none; color: #fff;
  padding: 7px 14px; border: 1px solid transparent; border-radius: 999px; background: none; cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.nav a:hover { border-color: #fff; }
.nav .sep { width: 1px; height: 16px; background: var(--rule); margin-inline: 8px; }
.nav .tool { color: var(--muted); border-color: var(--rule); font-size: 12px; padding: 5px 12px; }
.nav .tool:hover { color: var(--fg); }
.nav .tool[aria-pressed="true"], .nav .tool[aria-expanded="true"] { color: var(--bg); background: var(--fg); border-color: var(--fg); }

/* Phone: the header stays on one line. */
@media (max-width: 600px) {
  .top { gap: 8px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .brand { font-size: 12px; }
  .nav { flex-wrap: nowrap; gap: 0; }
  .nav a { padding: 7px 9px; font-size: 12px; }
}

/* Chapter rail */
.rail {
  position: fixed; left: max(24px, env(safe-area-inset-left, 0px)); top: 50%; transform: translateY(-50%);
  z-index: 15; display: flex; flex-direction: column; gap: 10px;
}
/* Lines only: the current chapter's line is longer. Names stay for screen readers and as a tooltip. */
.rail a {
  display: flex; align-items: center; padding: 4px 0; text-decoration: none; color: var(--muted);
}
.rail a::before { content: ""; width: 14px; height: 1px; background: currentColor; transition: width .2s; }
.rail a:hover::before { width: 22px; }
.rail a.on { color: var(--fg); }
.rail a.on::before { width: 28px; }
.rail span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 900px) { .rail { display: none; } }

/* Screens */
main { padding-top: 0; }
.screen {
  position: relative; min-height: min(100vh, 980px);
  display: grid; align-content: center;
  padding-block: 96px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  border-top: 1px dashed var(--rule);
}
/* Section heading: a short band, not a full screen. */
.screen.heading { min-height: 0; padding-block: clamp(72px, 14vh, 140px) clamp(8px, 3vh, 28px); }
.heading .hwrap { position: relative; width: 100%; max-width: var(--content); min-width: min(100%, 560px); margin-inline: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 22px; }
.heading .hh { margin: 0; font-size: clamp(30px, 4.4vw, 64px); font-weight: 500; letter-spacing: -.035em; line-height: 1; }
.heading .hw { display: inline-block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; white-space: nowrap; }
.heading .hc { display: inline-block; }
.heading .hn { flex: none; font-size: 13px; font-weight: 500; color: var(--muted); padding-bottom: .5em; }
.heading .hr { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; opacity: .35; transform-origin: 0 50%; }
/* AI Lab: a line, then cards for things built with AI tools. */
@media (min-width: 901px) { .screen.lab { padding-inline: max(140px, 5vw); } } /* clear of the left rail, and centred like the other screens */
.lab .wrap { width: 100%; max-width: var(--content); margin-inline: auto; display: grid; gap: clamp(32px, 5vh, 56px); }
.lab .kick { margin: 0 0 14px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.lab .line { margin: 0; max-width: 28ch; font-size: clamp(24px, 2.6vw, 38px); line-height: 1.2; font-weight: 500; letter-spacing: -.02em; text-wrap: balance; }
.lab .lgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 20px; }
.lab .lcard { display: grid; grid-template-rows: auto 1fr; border-radius: 8px; overflow: hidden; background: #1A1A19; color: inherit; text-decoration: none;
  box-shadow: 0 0 0 1px #2A2927; transition: box-shadow .25s; }
.lab a.lcard:hover, .lab a.lcard:focus-visible { box-shadow: 0 0 0 1px #6E6D69; }
.lab .lcover { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #151514; display: grid; place-items: center; }
.lab .lcover img { width: 100%; height: 100%; object-fit: cover; transition: scale .6s cubic-bezier(.2, .7, .2, 1); } /* hover uses `scale` so it never fights GSAP's transform */
.lab a.lcard:hover .lcover img { scale: 1.04; }
/* Framed covers (a product shot on a flat #0F0F0F background): the whole object shows, centred, on the same colour. */
.lab .lcover.framed { background: #0F0F0F; }
.lab .lcover.framed img { position: absolute; inset: 4% 0; width: 100%; height: 92%; object-fit: contain; }
.lab .lsoon { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 8px 14px; border: 1px dashed #3B3A37; border-radius: 999px; }
.lab .lmeta { padding: 22px 24px 24px; display: grid; gap: 10px; align-content: start; }
.lab .ltags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.lab .ltags li { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 4px 9px; border: 1px solid #3B3A37; border-radius: 999px; }
.lab h3 { margin: 4px 0 0; font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.lab .lmeta p { margin: 0; color: #B9B7B1; font-size: 15px; line-height: 1.5; max-width: 46ch; }
.lab .lgo { justify-self: start; margin-top: 6px; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; padding: 9px 16px; border-radius: 999px; background: var(--dark-fg); color: var(--dark-bg); }
.lab .lcard.off { opacity: .7; }
/* With motion, regular screens share one background on #stage that blends across boundaries (see flowScreens). */
.screen.blend, .screen.dark.blend { background: transparent; border-top-color: transparent; }
.screen.card { margin-top: -100vh; z-index: 5; box-shadow: 0 -40px 80px rgba(0, 0, 0, .35); }
.screen.dark { background: var(--dark-bg); color: var(--dark-fg); --ph: var(--dark-ph); --ph-line: var(--dark-line); --muted: #8D8B86; --rule: #2A2927; }
.wrap { width: 100%; max-width: var(--content); margin-inline: auto; min-width: 0; }

/* Placeholder image */
.ph {
  position: relative; background-color: var(--ph); min-height: 120px; max-width: 100%;
  background-image:
    linear-gradient(to top right, transparent calc(50% - .5px), var(--ph-line) 50%, transparent calc(50% + .5px)),
    linear-gradient(to bottom right, transparent calc(50% - .5px), var(--ph-line) 50%, transparent calc(50% + .5px));
  display: flex; align-items: flex-end;
}
.ph > .lab {
  margin: 12px; padding: 4px 8px; font-size: 11px; font-weight: 600; letter-spacing: .04em;
  background: var(--bg); color: var(--muted); border: 1px solid var(--ph-line); max-width: calc(100% - 24px);
}
.dark .ph > .lab { background: var(--dark-bg); }
.ph::before, .ph::after { /* crosshair registration marks */
  content: "+"; position: absolute; font-size: 14px; line-height: 1; color: var(--muted); font-weight: 300;
}
.ph::before { top: -8px; left: -4px; }
.ph::after { bottom: -8px; right: -4px; }

/* Full-bleed */
.screen.full { padding: 0; min-height: min(100vh, 980px); }
.screen.full .ph { position: absolute; inset: 0; min-height: 0; }
.screen.full .ph > .lab { position: absolute; top: 72px; right: max(16px, env(safe-area-inset-right, 0px)); }
.over {
  position: relative; z-index: 2; align-self: end;
  padding-block: 0 72px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.over .wrap > div { max-width: 640px; background: color-mix(in srgb, var(--bg) 88%, transparent); padding: 20px 24px; }
.dark .over .wrap > div { background: color-mix(in srgb, var(--dark-bg) 85%, transparent); }

/* Type */
.line { font-size: clamp(22px, 2.6vw, 34px); line-height: 1.3; font-weight: 500; letter-spacing: -.01em; text-wrap: balance; margin: 0; }
.big { font-size: clamp(40px, 6.4vw, 92px); line-height: 1.02; font-weight: 600; letter-spacing: -.03em; text-wrap: balance; margin: 0; }
.body { font-size: 17px; color: var(--muted); max-width: 58ch; margin: 14px 0 0; }
.cap { font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
mark.fill { background: var(--fill); color: var(--fill-fg); padding: 0 .2em; border-radius: 2px; }


/* Opening: pinned fresco, scroll pushes into the fingertip light (42.5% / 40.2% of the image) */
.screen.opening { display: block; align-content: normal; padding: 0; height: 600vh; min-height: 0; border: 0; background: #0E0C0A; }
.opening .pin { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.opening .art { position: absolute; inset: 0; transform-origin: 42.5% 40.2%; will-change: transform; }
.opening .art img, .opening .art video {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; display: block;
  object-fit: cover; object-position: 42.5% 40.2%;
}
/* The living fresco loop sits over the still and is removed when motion is reduced. */
.opening .clip { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; opacity: 0; }
.opening .o-title, .opening .o-line, .opening .cue { position: absolute; z-index: 2; color: var(--on-image); text-shadow: 0 1px 24px rgba(0,0,0,.45); }
.opening .o-title { top: 16%; left: 50%; transform: translateX(-50%); text-align: center; width: min(900px, calc(100% - 32px)); }
.opening .o-title h1 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(48px, 8vw, 128px); line-height: .95; margin: 10px 0 0; text-wrap: balance; }
.opening .name { font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; margin: 0; }
.opening .o-line { font-family: var(--serif); font-style: italic; font-size: clamp(26px, 3.4vw, 46px); line-height: 1.2; bottom: 14%; left: 50%; transform: translateX(-50%); width: min(760px, calc(100% - 32px)); text-align: center; margin: 0; opacity: 0; text-wrap: balance; }
.opening .o-room {
  position: absolute; z-index: 2; opacity: 0;
  left: max(16px, env(safe-area-inset-left, 0px)); bottom: 72px; max-width: min(640px, calc(100% - 32px));
  background: color-mix(in srgb, var(--bg) 88%, transparent); color: var(--fg); padding: 20px 24px;
}
@media (min-width: 901px) { .opening .o-room { left: 140px; } }
.opening .cue { bottom: 28px; left: 50%; transform: translateX(-50%); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.top.on-image .brand, .top.on-image .nav a { color: #fff; }

/* Sketchbook: a 16:9 frame that covers the viewport, so the code book sits exactly on the film's last frame.
   Book rectangle measured from the film's last frame (book-top-final.jpg): 20.8% / 17.6% / 58.9% × 73.5%. */
/* margin-top: -100vh lays this pin over the opening's last pinned screen, so the room-to-book film flows straight into the book. */
.screen.sketchbook { display: block; align-content: normal; padding: 0; height: 520vh; min-height: 0; margin-top: -100vh; position: relative; z-index: 3; border-top: 0; background: transparent; }
.sketchbook .pin { position: sticky; top: 0; height: 100vh; overflow: hidden; visibility: hidden; }
.sketchbook .pin.live { visibility: visible; } /* shown only once it sits exactly over the opening film's last frame */
.sketchbook .frame { position: absolute; left: 50%; top: 50%; width: max(100vw, 177.78vh); height: max(56.25vw, 100vh); transform: translate(-50%, -50%); }
.sketchbook .kf, .sketchbook .clip { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.sketchbook .book { position: absolute; left: 20.8%; top: 17.6%; width: 58.9%; height: 73.5%; perspective: 2400px; opacity: 0; }
.sketchbook .page, .sketchbook .leaf { position: absolute; top: 0; width: 50%; height: 100%; }
.sketchbook .page { background: var(--paper-page); color: #2a2622; padding: 9% 9%; display: grid; align-content: center; gap: 12px; }
.sketchbook .page.left { left: 0; box-shadow: inset -18px 0 24px -18px rgba(60,40,20,.35); }
.sketchbook .page.right { left: 50%; box-shadow: inset 18px 0 24px -18px rgba(60,40,20,.35); }
.sketchbook .page .body { color: #4b443c; font-size: clamp(12px, 1.05vw, 17px); margin: 0; }
.sketchbook .page .cap { color: #7a6f62; margin: 0; }
.sketchbook .leaf { left: 50%; transform-origin: left center; transform-style: preserve-3d; }
.sketchbook .face { position: absolute; inset: 0; background: var(--paper-page); backface-visibility: hidden; -webkit-backface-visibility: hidden; display: grid; place-items: center; padding: 7%; overflow: hidden; }
.sketchbook .face.front { box-shadow: inset 18px 0 24px -18px rgba(60,40,20,.35); }
.sketchbook .face.back { transform: rotateY(180deg); box-shadow: inset -18px 0 24px -18px rgba(60,40,20,.35); }
.sketchbook .face img { max-width: 100%; max-height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.sketchbook .face .line { color: #2a2622; font-size: clamp(16px, 1.7vw, 28px); padding: 4%; }
/* A drawing that spans both pages: each half shows its side of one image, meeting at the gutter. */
.sketchbook .spreadimg { position: absolute; top: 8%; bottom: 16%; background-repeat: no-repeat; background-size: 200% 100%; mix-blend-mode: multiply; }
.sketchbook .spreadimg.left { left: 6%; right: 0; background-position: left center; }
.sketchbook .spreadimg.right { left: 0; right: 6%; background-position: right center; }
.sketchbook .spread-cap { position: absolute; left: 6%; right: 6%; bottom: 4%; margin: 0; font-size: clamp(12px, 1.05vw, 17px); color: #4b443c; z-index: 1; }
.sketchbook .shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(40,25,10,.45), rgba(40,25,10,0) 70%); opacity: 0; pointer-events: none; }
/* Gallery link while the sketchbook is open: paper capsule under the book, readable over the mat. */
.sketchbook .gallery-btn { position: absolute; left: 50%; bottom: max(24px, 3.5vh); transform: translateX(-50%); z-index: 7;
  background: var(--paper-page); color: #2a2622; border-color: rgba(42,38,34,.35); box-shadow: 0 6px 24px rgba(0,0,0,.25); visibility: hidden; }
.sketchbook .gallery-btn:hover { background: #2a2622; color: var(--paper-page); }
/* Florence film on the last spread: multiplied onto the paper so the ink becomes the city on the page itself (grain, gutter
   and page shading show through), then the camera pushes into the book. .cam holds everything the push moves. */
.sketchbook .cam { position: absolute; inset: 0; transform-origin: 0 0; }
.sketchbook .clip-fl, .sketchbook .fl-white { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; transform-origin: 0 0; opacity: 0; }
.sketchbook .clip-fl { object-fit: cover; mix-blend-mode: multiply; }
.sketchbook .fl-white { background: #fff; } /* lifts the page out from under the film at the end of the push */

/* Real photo in a full-bleed screen */
.screen.full .photo { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; transform-origin: 50% 60%; will-change: transform; }
.screen.full { overflow: hidden; }

/* Quote set on a photo: white type over the dark stone on the right, with a soft scrim for contrast. */
.screen.full .qover { position: absolute; z-index: 2; inset: 0; display: grid; align-content: center; justify-items: end;
  padding: 96px max(32px, 6vw); color: #fff; pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.55) 100%); }
.screen.full .qover blockquote { margin: 0; max-width: min(520px, 38vw); }
.screen.full .qover blockquote p { margin: 0; font-size: clamp(22px, 2.6vw, 40px); line-height: 1.18; font-weight: 500; letter-spacing: -.01em; text-wrap: balance; text-shadow: 0 2px 24px rgba(0,0,0,.5); }
.screen.full .qover .cite { margin: 22px 0 0; max-width: min(520px, 38vw); width: 100%; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.75); }
@media (max-width: 700px) {
  .screen.full .qover { justify-items: start; align-content: end; padding: 96px 16px 48px; background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.7) 100%); }
  .screen.full .qover blockquote, .screen.full .qover .cite { max-width: 100%; }
}
/* Cursor image trail (S05, S06): your work appears under the pointer and fades, text stays on top. */
.trail-host { position: relative; overflow: hidden; }
.trail-host > .wrap, .trail-host .wl { position: relative; z-index: 2; }
.trail-hint { position: absolute; left: 50%; bottom: max(32px, 5vh); z-index: 3; transform: translateX(-50%); display: grid; justify-items: center; gap: 8px;
  color: #fff; pointer-events: none; font-size: 9px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; opacity: .7; }
.trail-hint svg { display: block; image-rendering: pixelated; }
.trail-img { position: absolute; left: 0; top: 0; width: clamp(150px, 15vw, 240px); height: auto; max-width: none; z-index: 1;
  pointer-events: none; opacity: 0; border-radius: 2px; box-shadow: 0 18px 40px rgba(0,0,0,.45); will-change: transform, opacity; }
/* A small line, pinned while its words light up with the scroll. */
.screen.words { display: block; align-content: normal; padding: 0; height: 240vh; min-height: 0; }
.words .stick { position: sticky; top: 0; height: 100vh; display: grid; place-content: center; justify-items: center; gap: 28px; padding-inline: max(16px, env(safe-area-inset-left, 0px)); }
.words .stick.stack > .wl { grid-area: 1 / 1; } /* with motion the lines share one spot and take turns */
.words .wl { margin: 0; max-width: min(880px, 100%); text-align: center; font-size: clamp(24px, 3vw, 44px); line-height: 1.25; font-weight: 500; letter-spacing: -.02em; text-wrap: balance; }
.words .w { display: inline-block; }

/* Process */
.process .row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; }
.process .row .ph { aspect-ratio: 1; min-height: 0; }
.process .pimg { position: relative; margin: 0; aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: var(--ph); }
.process .pimg img { width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; }
.process .pimg figcaption { position: absolute; left: 12px; bottom: 12px; padding: 4px 10px; border-radius: 999px; font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; background: var(--bg); color: var(--fg); }
@media (max-width: 760px) { .process .row { grid-template-columns: repeat(2, 1fr); } }

/* Project */
.project .wrap { display: grid; gap: 28px; }
/* Project stack (motion only, see buildProjectStacks). */
.screen.pstack { display: block; align-content: normal; padding: 0; min-height: 0; border-top: 0; }
.pstack .pstage { position: sticky; top: 0; height: 100vh; overflow: hidden; perspective: 1600px; perspective-origin: 50% 40%; }
.pstack .pcard { position: absolute; inset: 0; min-height: 0; padding: 88px max(16px, 4vw) 72px; display: grid; align-content: center;
  border-top: 0; background: transparent; transform-origin: 50% 100%; will-change: transform, opacity, filter; backface-visibility: hidden; }
.pstack .pcard .wrap { max-width: var(--content); }
.pstack .pcard .pfig { border-radius: 4px; box-shadow: 0 40px 90px -30px rgba(20, 16, 12, .45); }
.pstack .pcount { position: absolute; z-index: 5; left: 50%; bottom: 28px; transform: translateX(-50%); margin: 0; display: flex; align-items: center; gap: 12px;
  font-size: 11px; font-weight: 600; letter-spacing: .18em; font-variant-numeric: tabular-nums; color: var(--muted); }
.pstack .pcount b { color: var(--fg); font-weight: 600; }
.pstack .pcount i { display: block; width: 72px; height: 1px; background: var(--rule); position: relative; overflow: hidden; }
.pstack .pcount u { position: absolute; inset: 0; background: var(--fg); transform-origin: 0 50%; transform: scaleX(0); }
.project .ph { aspect-ratio: 16 / 9; width: 100%; }
.project .pfig { position: relative; margin: 0; width: 100%; border-radius: 4px; overflow: hidden; }
/* Project title on the image, bottom left, over a soft shade so it reads on bright photos too. */
.project .ptitle { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: clamp(18px, 3vw, 36px); padding-top: 80px; color: #fff; pointer-events: none;
  background: linear-gradient(to top, rgba(12, 10, 8, .55), rgba(12, 10, 8, 0)); }
.project .pname { font-size: clamp(22px, 2.6vw, 40px); font-weight: 600; letter-spacing: -.02em; line-height: 1.05; }
.project .ptag { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .45); backdrop-filter: blur(6px); }
.project .pgo { position: absolute; right: clamp(16px, 2.4vw, 32px); bottom: clamp(16px, 2.4vw, 32px); z-index: 3; display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font-size: 13px; font-weight: 600; color: #fff; padding: 9px 16px; border-radius: 999px; background: rgba(12, 10, 8, .4); border: 1px solid rgba(255, 255, 255, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.project .pgo:hover { background: #fff; color: #141414; }
.project .pgo:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.project .pshot { display: block; aspect-ratio: 16 / 9; width: 100%; height: auto; object-fit: cover; }
.project .meta { display: flex; justify-content: space-between; align-items: center; gap: 24px; border-top: 1px solid var(--rule); padding-top: 20px; }
.project .meta > * { min-width: 0; }
.project h3 { font-size: 26px; font-weight: 600; letter-spacing: -.02em; margin: 0; }
.project .k { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 4px; }
.project p { margin: 0; }
.btn { display: inline-block; font-size: 14px; font-weight: 500; padding: 10px 20px; border: 1px solid currentColor; border-radius: 999px; text-decoration: none; color: inherit; white-space: nowrap; background: none; cursor: pointer; transition: background-color .15s, color .15s; }
.btn:hover { background: var(--fg); color: var(--bg); }
.dark .btn:hover { background: var(--dark-fg); color: var(--dark-bg); }


/* Collage */
/* Team wall: a masonry of team photos. Hovering one names it and dims the rest (GSAP); touch screens show every name. */
.screen.wall { padding-bottom: 160px; }
.wall .wrap { max-width: 1400px; }
.wall .cols { display: grid; grid-template-columns: repeat(var(--cols, 5), 1fr); gap: 16px; align-items: start; margin-inline: auto; }
.wall .col { display: grid; gap: 16px; align-content: start; }
.tile { position: relative; margin: 0; overflow: hidden; border-radius: 4px; cursor: pointer; background: var(--ph); }
.tile > .ph, .tile > img, .tile > video { display: block; width: 100%; height: 100%; min-height: 0; object-fit: cover; will-change: transform, filter; }
.tile > .ph > .lab, .tile > .ph::before, .tile > .ph::after { display: none; }
.tile figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 14px 14px; color: #fff; font-size: 13px; font-weight: 600; line-height: 1.3;
  background: linear-gradient(to top, rgba(0, 0, 0, .75), rgba(0, 0, 0, 0)); opacity: 0; transform: translateY(14px); pointer-events: none; }
@media (hover: none) { .tile figcaption { opacity: 1; transform: none; } }
@media (max-width: 900px) {
  .wall .cols { display: block; column-count: 2; column-gap: 12px; }
  .wall .col { display: contents; }
  .tile { break-inside: avoid; margin-bottom: 12px; }
}
/* Device screens: a pinned stage with only the device. Its screen runs the prototype; no copy on the page. */
.screen.device { display: block; align-content: normal; padding: 0; min-height: 0; }
.device .pin { position: sticky; top: 0; height: 100vh; overflow: hidden; display: grid; place-items: center; padding: 84px max(24px, 5vw) 40px; }
@media (min-width: 901px) { .device .pin { padding-left: max(140px, 5vw); } }
.dv-stage { position: relative; display: grid; grid-template-rows: auto auto; align-content: center; justify-items: center; gap: 18px; width: 100%; min-width: 0; height: 100%; }
/* Small text link under the device, styled and hovering like the header's navigation links. */
.dv-more { position: relative; z-index: 6; display: inline-flex; align-items: center; font-size: 13px; font-weight: 500; text-decoration: none; color: var(--fg);
  padding: 7px 14px; border: 1px solid transparent; border-radius: 999px; transition: border-color .15s; }
.dv-more:hover { border-color: currentColor; }
.dv-more svg.px { margin-left: .5em; }
/* Arrows beside the laptop step between projects (Vaya Via, then a Coming soon screen for now). */
.dv-stage { --lw: min(100%, 1120px, (100vh - 230px) * 1.52); }
.dv-arrow { position: absolute; z-index: 6; top: calc(50% - 40px); width: 44px; height: 44px; display: grid; place-items: center; padding: 0;
  color: var(--fg); background: transparent; border: 1px solid color-mix(in srgb, currentColor 22%, transparent); border-radius: 999px; cursor: pointer; transition: border-color .15s, opacity .2s; }
.dv-arrow svg.px { width: 18px; height: auto; }
.dv-arrow.prev { left: max(0px, calc(50% - var(--lw) / 2 - 64px)); }
.dv-arrow.next { right: max(0px, calc(50% - var(--lw) / 2 - 64px)); }
.dv-arrow:hover:not(:disabled) { border-color: currentColor; }
.dv-arrow:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.dv-arrow:disabled { opacity: .25 !important; cursor: default; }
.soon { position: absolute; inset: 0; z-index: 8; display: grid; place-content: center; justify-items: center; text-align: center; gap: 10px;
  background: #141414; color: #F3EFE6; visibility: hidden; }
.soon .sk { margin: 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; opacity: .6; }
.soon .sh { margin: 0; font-size: clamp(28px, 4.4vw, 64px); font-weight: 300; letter-spacing: -.02em; }
.soon .sbar { width: 48px; height: 1px; background: currentColor; opacity: .5; }
.soon .ss { margin: 0; font-size: 14px; opacity: .65; }
.on-soon .pacts, .on-soon .pcur, .on-soon .pexit { visibility: hidden !important; }
.on-soon .dv-more { visibility: hidden; }
.on-soon .scr { background: #141414; }
.dev-phone .soon .sk { font-size: 3.4cqw; } .dev-phone .soon .sh { font-size: 12cqw; } .dev-phone .soon .ss { font-size: 4cqw; max-width: 80cqw; }
/* Phone: the arrows flank the phone screen, which sits centred in the pinned frame (same sizes as .handshot). */
.dev-phone .dv-arrow { --H: min(calc((100vh - 170px) / 0.4991), 398vw); top: calc(80px + 0.2496 * var(--H) - 22px); }
.dev-phone .dv-arrow.prev { left: max(16px, calc(50% - 0.25 * var(--H) - 44px)); }
.dev-phone .dv-arrow.next { right: max(16px, calc(50% - 0.25 * var(--H) - 44px)); }
.dev-phone .dv-arrow { background: rgba(241, 237, 229, .88); }
@media (max-width: 700px), (max-aspect-ratio: 1/1) { .dev-phone .dv-arrow { top: auto; bottom: 10px; } .dev-phone .dv-arrow.prev { left: calc(50% - 140px); } .dev-phone .dv-arrow.next { right: calc(50% - 140px); } }
 /* no white hairline at the screen's fractional edges */
@media (max-width: 700px), (max-aspect-ratio: 1/1) {
  .dv-arrow { top: auto; bottom: 30px; }
  .dv-arrow.prev { left: calc(50% - 140px); } .dv-arrow.next { right: calc(50% - 140px); }
}
.dv-cam { position: relative; width: 100%; display: grid; place-items: center; }
/* Laptop: the lid hinges on its bottom edge. */
.laptop { width: min(100%, 1120px, (100vh - 230px) * 1.52); perspective: 2200px; }
.laptop .lid { position: relative; aspect-ratio: 16 / 10; background: #161616; border-radius: 16px 16px 4px 4px; padding: 2.4% 2.4% 3.2%;
  transform-origin: 50% 100%; box-shadow: 0 0 0 1px #2c2c2c inset, 0 30px 60px -20px rgba(0, 0, 0, .35); }
.laptop .base { position: relative; height: clamp(10px, 1.6vw, 16px); width: 114%; margin-left: -7%; border-radius: 2px 2px 16px 16px;
  background: linear-gradient(#e2e1dd, #a9a8a3); box-shadow: 0 24px 40px -18px rgba(0, 0, 0, .45); }
.laptop .lidback { position: absolute; inset: 0; z-index: 7; border-radius: inherit; pointer-events: none; background: linear-gradient(#e6e5e1, #bdbcb7); } /* the lid's aluminium back, seen while it is closed */
.device.still .lidback { display: none; } /* without motion the laptop is simply open */
.laptop .base::before { content: ""; position: absolute; left: 50%; top: 0; width: 14%; height: 45%; transform: translateX(-50%); border-radius: 0 0 8px 8px; background: #b9b8b3; }
/* Phone, held from below by a hand. */
.grip { width: auto; }
.phone { position: relative; z-index: 2; width: min(300px, 32vh * 1.05, 62vw); aspect-ratio: 9 / 19.5; border-radius: 46px; background: #111; padding: 11px;
  box-shadow: 0 0 0 2px #2a2a2a inset, 0 40px 80px -24px rgba(0, 0, 0, .5); }
.dev-phone .phone { width: min(340px, (100vh - 210px) / 2.08, 62vw); }
.phone .scr { border-radius: 36px; }
/* The hand: a real clip (786 x 1170). The scene takes the clip's own background colour, so its edges disappear. */
.screen.dev-phone { background: #F1EDE5; }
.handcam { width: auto; position: static; } /* static, so the shot is placed against the pinned frame (the window) */
/* The shot is scaled so the phone's screen fills the window's height (between the header and the link below), and
   the empty background and the arm run off the edges. --H is the clip's height; the screen is 49.91% of it, starting
   at 16.41%, and its width (23.08% of --H) never passes 92vw. Sized by height with the clip's ratio, so the screen
   overlay stays aligned at every size. */
.dev-phone .dv-stage { position: static; }
.handshot { --H: min(calc((100vh - 170px) / 0.4991), 398vw); position: absolute; left: 50%; top: calc(80px - 0.1641 * var(--H));
  height: var(--H); width: calc(var(--H) * 786 / 1170); transform: translateX(-50%); }
/* Over the wrist here, so it gets the scene's colour behind it to stay readable. translate (not transform), so GSAP's
   own transform doesn't undo the centring. */
.dev-phone .dv-more { position: absolute; left: 50%; bottom: 14px; translate: -50% 0; background: rgba(241, 237, 229, .88); backdrop-filter: blur(6px); }
.handvid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
  /* All four edges feather into the page (the arm fades out at the bottom), so the clip has no visible boundary. */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 7%, #000 80%, transparent 99%), linear-gradient(to right, transparent 0, #000 9%, #000 91%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent 0, #000 7%, #000 80%, transparent 99%), linear-gradient(to right, transparent 0, #000 9%, #000 91%, transparent 100%);
  mask-composite: intersect; }
/* The phone's screen in the clip's last frame, measured from its green screen. */
.hscreen { position: absolute; left: 32.82%; top: 16.41%; width: 34.35%; height: 49.91%; }
.hscreen .scr { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 10.4% / 4.8%; background: #0b0b0b; }
/* The screen: a small clickable prototype. */
.scr { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 3px; background: #fff; }
.pframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; background: #0b0b0b; transform-origin: 0 0;
  will-change: transform; } /* its own GPU layer: camera moves scale the picture instead of redrawing thousands of vector shapes */
/* Product film over the prototype. Sizes follow the screen's width (container units), so it reads on laptop and phone. */
.scr { container-type: inline-size; }
.film { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; font-family: var(--sans); text-transform: none; letter-spacing: normal; text-align: left; }
.film .spot { position: absolute; left: 0; top: 0; border-radius: 1cqw; box-shadow: 0 0 0 300vmax rgba(4, 8, 16, .58); opacity: 0; visibility: hidden; }
.film .ring { position: absolute; border-radius: 1cqw; box-shadow: 0 0 0 .25cqw var(--fac), 0 0 2.4cqw color-mix(in srgb, var(--fac) 55%, transparent); }
.film .fcap { position: absolute; max-width: 44cqw; padding: 1.1cqw 1.7cqw; border-radius: 1.2cqw; background: var(--cbg); color: var(--cfg);
  font-size: 1.75cqw; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; box-shadow: 0 1.4cqw 3.4cqw rgba(0, 0, 0, .35); }
.film .fcap::before { content: ""; display: block; width: 3cqw; height: .3cqw; margin-bottom: .8cqw; border-radius: 1px; background: var(--fac); }
.film .tcard { position: absolute; inset: 0; display: grid; align-content: center; justify-items: start; padding: 0 9cqw; background: color-mix(in srgb, var(--fbg) 70%, transparent); color: var(--ffg); opacity: 0; visibility: hidden; /* see-through: the prototype stays visible behind the title; it fades (cheap) rather than wipes */
  }
.film .fk { margin: 0 0 1.6cqw; font-size: 1.25cqw; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--fac); }
.film .fh { margin: 0; font-size: 6.6cqw; line-height: 1; font-weight: 700; letter-spacing: -.035em; }
.film .fh .w, .film .fs .w { display: inline-block; }
.film .fbar { display: block; width: 8cqw; height: .35cqw; margin: 2.2cqw 0 1.8cqw; background: var(--fac); transform-origin: 0 50%; }
.film .fs { margin: 0; max-width: 54cqw; font-size: 1.9cqw; line-height: 1.4; font-weight: 500; opacity: .85; }
.dev-phone .film .fcap { max-width: 82cqw; padding: 2.6cqw 3.6cqw; border-radius: 3cqw; font-size: 4.3cqw; }
.dev-phone .film .fcap::before { width: 7cqw; height: .7cqw; margin-bottom: 1.8cqw; }
.dev-phone .film .tcard { padding: 0 8cqw; }
.dev-phone .film .fk { font-size: 3.1cqw; margin-bottom: 3.4cqw; }
.dev-phone .film .fh { font-size: 14cqw; }
.dev-phone .film .fbar { width: 16cqw; height: .9cqw; margin: 5cqw 0 4cqw; }
.dev-phone .film .fs { max-width: 84cqw; font-size: 4.6cqw; }
.dev-phone .film .ring, .dev-phone .film .spot { border-radius: 3cqw; }
.scr.live .film { display: none; }
.scr.live .pframe { pointer-events: auto; }
.pexp, .pexit { position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(17, 17, 17, .82); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; backdrop-filter: blur(6px); }
/* End-of-film actions: explore the prototype, or read the detailed study. They appear on the end card and then stay. */
.pacts { position: absolute; z-index: 5; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 10px; visibility: hidden; opacity: 0; }
.pacts .pexp { position: static; padding: 11px 20px; font-size: 13px; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.pcase { display: inline-flex; align-items: center; padding: 10px 19px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .7);
  background: rgba(17, 17, 17, .35); color: #fff; font-size: 13px; font-weight: 600; letter-spacing: .02em; text-decoration: none; white-space: nowrap; backdrop-filter: blur(6px); }
.pcase svg.px { margin-left: .5em; }
.pexp:hover, .pexit:hover, .pstudy:hover, .pcase:hover { background: #fff; color: #111; }
.dev-phone .pacts { flex-direction: column; align-items: stretch; width: max-content; bottom: 22px; }
.dev-phone .pacts .pexp, .dev-phone .pcase { justify-content: center; font-size: 12px; padding: 9px 16px; }
.pexit { right: 10px; top: 10px; padding: 6px 12px; display: none; }
.pstudy { position: absolute; z-index: 2; left: 10px; top: 10px; display: none; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: rgba(17, 17, 17, .82); color: #fff; font-size: 11px; font-weight: 600; text-decoration: none; backdrop-filter: blur(6px); }
.dev-phone .pstudy, .dev-phone .pexit { top: 8px; padding: 5px 10px; font-size: 10px; } /* over the status bar, clear of the tab bar */
.scr.live .pacts { display: none; }
.scr.live .pexit, .scr.live .pstudy { display: inline-flex; }
/* Without motion there is no film, so the actions are there from the start. */
.device.still .pacts { visibility: visible; opacity: 1; }
/* Tour pointer: an arrow (laptop) or a touch (phone), with a ring for each tap. */
.pcur { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; opacity: 0; visibility: hidden; }
.pcur svg { position: relative; z-index: 1; display: block; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .35)); }
.pcur i { position: absolute; left: -16px; top: -16px; width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .9); opacity: 0; }
.pcur.touch { width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: rgba(255, 255, 255, .55); box-shadow: 0 0 0 1px rgba(0, 0, 0, .15), 0 4px 14px rgba(0, 0, 0, .3); }
.pcur.touch i { left: -4px; top: -4px; width: 38px; height: 38px; }
.scr.live .pcur { display: none; }
/* The phone screen keeps the app's own proportions (402 x 883). */
.phone { aspect-ratio: auto; }
.phone .scr { aspect-ratio: 402 / 883; height: auto; }
.device.still .pin { position: relative; height: auto; min-height: 100vh; }
@media (max-width: 900px) { .device .pin { padding: 76px 16px 28px; } }
/* Upright screens (phones, tablets held upright): the device fills the width. */
@media (max-aspect-ratio: 21/20) {
  .laptop { width: min(96%, (100vh - 250px) * 1.52); }
  .dev-phone .phone { width: min(300px, (100vh - 240px) / 2.08, 70vw); border-radius: 36px; padding: 9px; }
  .dev-phone .phone .scr { border-radius: 28px; }
}

/* Portrait */
.portrait .wrap { display: grid; justify-items: center; text-align: center; gap: 36px; }
.portrait .ph, .portrait .pic { width: min(440px, 100%); aspect-ratio: 4 / 5; }
.portrait .pic { display: block; object-fit: cover; border-radius: 4px; }
.portrait .line { max-width: 24ch; }

/* Pixel icons (1-bit Mac style): crisp squares in the text colour, sitting on the text line. */
svg.px { display: inline-block; vertical-align: -0.12em; image-rendering: pixelated; }
.btn svg.px { margin-left: .5em; opacity: .9; }
.ask svg.px { margin-right: .4em; }

/* End */
.end .wrap { display: grid; gap: 40px; }
.end .big { font-size: clamp(32px, 6.4vw, 88px); } /* the second line stays whole on a phone */
.end .ask { display: flex; gap: 10px; align-items: center; border: 1px solid var(--rule); border-radius: 999px; padding: 12px 20px; max-width: 560px; color: var(--muted); font-size: 15px; }
/* Loading screen: the Duomo drawn line by line while the opening film downloads, on warm paper. */
.loader { position: fixed; inset: 0; z-index: 400; display: grid; place-content: center; justify-items: center; gap: 32px; padding: 24px;
  background: radial-gradient(ellipse at 50% 45%, #F6F2EB 0%, #EDE7DD 70%, #E6DFD3 100%); color: #1d1a16;
  visibility: hidden; opacity: 0; } /* shown only on a slow connection (story.js) */
.no-gate .loader { display: none; }
.loader .lduomo { width: min(620px, 84vw); height: auto; overflow: visible; }
.loader .lcap { display: flex; align-items: baseline; gap: 16px; margin: 0; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: #6b6358; }
.loader .lcap span { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 20px; letter-spacing: 0; text-transform: none; color: #2b2620; }
.loader .lcap b { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 4ch; text-align: right; }
.loader .lcap i { font-style: normal; }
.gate:not(.ready) .gin, .gate:not(.ready) .gnote, .gate:not(.ready) .gsnd { visibility: hidden; } /* revealed by story.js once the page is ready */
/* Entry screen: "Suyash's Bottega". The fresco, dimmed, behind a short welcome and two ways in. */
.gate { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 32px 24px; background: #0E0C0A; color: var(--on-image); text-align: center; overflow: hidden; }
.no-gate .gate { display: none; }
.gate .gbg { position: absolute; inset: -4%; background: url(../opening/fresco.webp) 50% 40% / cover no-repeat; filter: blur(6px) brightness(.32) saturate(.9); transform: scale(1.04); }
.gate .gbg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, rgba(14,12,10,0) 0%, rgba(14,12,10,.75) 75%); }
.gate .gin { position: relative; display: grid; justify-items: center; max-width: 640px; }
.gate h2 { margin: 24px 0 0; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(56px, 9vw, 128px); line-height: .95; letter-spacing: -.01em; }
.gate .grole { margin: 20px 0 0; font-size: clamp(20px, 2.2vw, 28px); line-height: 1.25; font-weight: 500; letter-spacing: -.01em; text-wrap: balance; }
.gate .gl { margin: 16px 0 0; max-width: 40ch; font-size: clamp(16px, 1.6vw, 18px); line-height: 28px; opacity: .78; text-wrap: balance; }
.gate .gact { display: grid; justify-items: center; gap: 16px; margin-top: 40px; }
.gate .gwork { display: inline-flex; align-items: center; gap: 8px; padding: 16px 32px; border: 1px solid var(--on-image); border-radius: 999px; background: var(--on-image); color: #0E0C0A;
  font: 600 15px/20px var(--sans); text-decoration: none; transition: background-color .2s, color .2s; }
.gate .gwork:hover { background: none; color: var(--on-image); }
.gate .gwork:focus-visible { outline: 2px solid var(--on-image); outline-offset: 4px; }
@media (min-width: 900px) { /* desktop: wider block, the name on one line, one sentence per line */
  .gate .gin { max-width: 920px; }
  .gate h2 { white-space: nowrap; }
  .gate .gl { max-width: none; }
  .gate .gl span { display: block; }
}
.gate .gstory { padding: 8px 4px; border: 0; background: none; color: var(--on-image); font: 600 14px/20px var(--sans); cursor: pointer;
  text-decoration: underline; text-decoration-color: rgba(247,239,226,.45); text-underline-offset: 6px; transition: text-decoration-color .2s; }
.gate .gstory:hover { text-decoration-color: currentColor; }
/* Sound toggle: the same pixel speaker and corner as the site's sound button. On by default; pressing it mutes the story. */
.gate .gsnd { position: absolute; z-index: 1; left: max(20px, env(safe-area-inset-left, 0px)); bottom: max(20px, env(safe-area-inset-bottom, 0px));
  width: 40px; height: 40px; padding: 0; border: 0; background: none; color: var(--on-image); cursor: pointer; }
.gate .gsnd svg.px { position: absolute; left: 8px; top: 8px; display: block; }
.gate .gsnd svg[data-snd="off"], .gate .gsnd[aria-pressed="false"] svg[data-snd="on"] { display: none; }
.gate .gsnd[aria-pressed="false"] svg[data-snd="off"] { display: block; }
.gate button:focus-visible { outline: 2px solid var(--on-image); outline-offset: 4px; }
.gate .gnote { position: absolute; left: 0; right: 0; bottom: max(24px, env(safe-area-inset-bottom, 0px)); margin: 0; font-size: 12px; line-height: 16px; letter-spacing: .08em; opacity: .5; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Music credits: one line that runs along the bottom of the last screen. */
.end { position: relative; }
.credits { position: absolute; left: 84px; right: 84px; bottom: 20px; overflow: hidden; border-top: 1px solid var(--rule); padding: 12px 0 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.credits .cr-run { display: flex; width: max-content; will-change: transform; }
.credits .cr-set { display: flex; flex: none; align-items: center; white-space: nowrap; }
.credits .cr-set span { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 0 28px; }
.credits .cr-set span b { font-weight: 600; color: var(--fg); letter-spacing: .14em; }
.credits .cr-set i { width: 5px; height: 5px; background: var(--muted); flex: none; }
@media (prefers-reduced-motion: reduce) { .credits .cr-set + .cr-set { display: none; } .credits .cr-run { width: auto; flex-wrap: wrap; } .credits .cr-set { white-space: normal; flex-wrap: wrap; } }
.end .links { display: flex; flex-wrap: wrap; gap: 10px; }

/* Annotations */

/* Drafting scene: overlaps the sketchbook's last two screens and fades in over its final spread. */
.screen.drafting { display: block; align-content: normal; padding: 0; min-height: 0; margin-top: -200vh; position: relative; z-index: 4; border-top: 0; background: transparent; }
.drafting .pin { position: sticky; top: 0; height: 100vh; overflow: hidden; opacity: 0; background: #2a241d; visibility: hidden; }
.drafting .pin.live { visibility: visible; } /* shown only once it sits exactly over the sketchbook's last frame, never sliding in */
.drafting .frame { position: absolute; left: 50%; top: 50%; width: max(100vw, 177.78vh); height: max(56.25vw, 100vh); transform: translate(-50%, -50%); }
.drafting .bg { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; transform-origin: 30% 40%; }
/* Florence film: starts on the drawing in the open sketchbook, grows to full frame, ends on the room (= .bg). */
.drafting .clip { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; transform-origin: 0 0; opacity: 0; }
.drafting.has-film .pin { background: transparent; }
/* Nail at 24% / 12% of the frame, on the bare plaster wall. Sheets are 4:3 and hang from a hole 5% below their top edge. */
.drafting .hang { position: absolute; left: 6%; top: 9.6%; width: 36%; height: 48%; }
.drafting .sheet { position: absolute; inset: 0; transform-origin: 50% 5%; will-change: transform; }
.drafting .paper { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.drafting .sh { position: absolute; inset: 3% -1.5% -3% 1.5%; background: rgba(45,30,15,.42); filter: blur(14px); border-radius: 2px; }
.drafting .nail { position: absolute; left: 50%; top: 5%; width: 2.6%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; z-index: 20;
  background: radial-gradient(circle at 35% 30%, #b7aa98, #5d5246 55%, #2c251f); box-shadow: 1px 3px 4px rgba(30,20,10,.55); }
.drafting .words { position: absolute; left: 6%; top: 62%; width: 36%; color: #2a2622; }
.drafting .say { position: absolute; left: 0; top: 0; width: 100%; opacity: 0; }
.drafting .say .cap { color: #2f261d; margin: 0 0 8px; font-size: 13px; font-weight: 600; letter-spacing: .16em; }
.drafting .say .line { margin: 0; font-size: clamp(20px, 2vw, 34px); line-height: 1.2; }
.drafting .say .body { margin: 0; color: #4b443c; font-size: clamp(13px, 1.05vw, 17px); }
@media (max-aspect-ratio: 4/5) {
  .drafting .frame { transform: translate(-24%, -50%); --hw: min(64vh, 92vw); }
  .drafting .hang { left: calc(24% - var(--hw) / 2); width: var(--hw); height: calc(var(--hw) * .75); }
  .drafting .words { left: calc(24% - var(--hw) / 2); width: var(--hw); top: calc(9.6vh + var(--hw) * .75 + 28px); }
}
/* Sketchbook on an upright screen: the caption moves into the half of the left page that is in view. */
@media (max-aspect-ratio: 21/20) { .sketchbook .spread-cap { left: calc(100% - 50vw + 16px); } }
/* Smoothed scroll (Lenis) keeps native scrolling; these stop the browser's own smoothing from fighting it. */
/* Sound button: a 1-bit Macintosh pixel speaker, bottom left, with no tile behind it. Waves = sound on, X = muted.
   White pixels with a difference blend turn black over white and white over black. */
.era { position: fixed; z-index: 25; left: max(20px, env(safe-area-inset-left, 0px)); bottom: max(20px, env(safe-area-inset-bottom, 0px));
  width: 40px; height: 40px; color: #fff; mix-blend-mode: difference; pointer-events: auto; cursor: pointer; }
.era svg.px { position: absolute; left: 8px; top: 8px; display: block; }
.era svg[data-snd="off"], .era.off svg[data-snd="on"] { display: none; }
.era.off svg[data-snd="off"] { display: block; }
.era:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Art gallery: a full-screen room over the page, opened from the sketchbook. The film and the wall photo share one
   16:9 frame fitted inside the screen, so the clickable drawings sit exactly on the drawings in the film's last frame. */
.gal { position: fixed; inset: 0; z-index: 50; background: #0E0C0A; color: #F3EBDD; display: grid; place-items: center; }
.gal .gscroll { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
.gal .gframe { position: relative; width: min(100vw, 177.78vh); height: min(56.25vw, 100vh); }
/* Phones and upright tablets: the room fills the height and is wider than the screen, so you swipe along the wall. */
@media (max-aspect-ratio: 1/1) {
  .gal .gscroll { display: block; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .gal .gscroll::-webkit-scrollbar { display: none; }
  .gal .gframe { height: 100%; width: auto; aspect-ratio: 16 / 9; max-width: none; }
}
/* The site header stays on top of the gallery, in the light colour used over images. */
.top.in-gallery { z-index: 55; }
.top.in-gallery { mix-blend-mode: normal; }
.top.in-gallery .brand, .top.in-gallery .nav a { color: #fff; text-shadow: 0 1px 12px rgba(0, 0, 0, .7); }
.gal video, .gal .gwall { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: fill; display: block; }
.gal .gwall { opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.gal.at-wall .gwall { opacity: 1; }
.gal .gstart { position: absolute; inset: 0; z-index: 1; border: 0; background: none; cursor: zoom-in; }
.gal.at-wall .gstart, .gal.moving .gstart { display: none; }
.gal .gart { position: absolute; z-index: 2; border: 0; padding: 0; background: none; cursor: zoom-in; display: none; border-radius: 2px;
  transition: transform .2s ease, box-shadow .2s ease; }
.gal.at-wall .gart { display: block; }
.gal .gart:hover, .gal .gart:focus-visible { transform: translateY(-3px) scale(1.03); box-shadow: 0 16px 34px rgba(0, 0, 0, .5), 0 0 0 2px #F3EBDD; outline: none; }
.gal .gbar { position: absolute; z-index: 3; top: calc(72px + env(safe-area-inset-top, 0px)); left: max(16px, env(safe-area-inset-left, 0px));
  right: max(16px, env(safe-area-inset-right, 0px)); display: flex; justify-content: space-between; gap: 12px; pointer-events: none; }
.gal .gbar > * { pointer-events: auto; }
.gbtn { font-size: 13px; font-weight: 600; padding: 9px 16px; border-radius: 999px; border: 1px solid rgba(243, 235, 221, .5);
  background: rgba(14, 12, 10, .6); color: #F3EBDD; backdrop-filter: blur(6px); cursor: pointer; }
.gbtn:hover { background: #F3EBDD; color: #0E0C0A; }
.gbtn:focus-visible { outline: 2px solid #F3EBDD; outline-offset: 3px; }
.gal .ghint { position: absolute; z-index: 3; left: 50%; bottom: max(24px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); margin: 0;
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; padding: 8px 14px; border-radius: 999px;
  background: rgba(14, 12, 10, .6); pointer-events: none; white-space: nowrap; }
.glight { position: fixed; inset: 0; z-index: 60; background: rgba(10, 8, 6, .94); color: #F3EBDD; display: grid; place-items: center;
  padding: 72px max(64px, env(safe-area-inset-right, 0px)) 24px max(64px, env(safe-area-inset-left, 0px)); }
.glight figure { margin: 0; display: grid; justify-items: center; gap: 14px; min-width: 0; }
.glight img { max-width: 100%; max-height: calc(100vh - 170px); object-fit: contain; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.glight figcaption { font-size: 15px; text-align: center; }
.glight figcaption span { display: block; font-size: 12px; letter-spacing: .1em; color: rgba(243, 235, 221, .65); margin-top: 4px; font-variant-numeric: tabular-nums; }
.glight .gx { position: absolute; top: max(16px, env(safe-area-inset-top, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); }
.glight .gnav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; padding: 0; font-size: 18px; }
.glight .gprev { left: max(10px, env(safe-area-inset-left, 0px)); }
.glight .gnext { right: max(10px, env(safe-area-inset-right, 0px)); }
@media (max-width: 600px) { .glight { padding-left: 16px; padding-right: 16px; padding-bottom: 76px; } .glight .gnav { top: auto; bottom: 16px; transform: none; } }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
