/* Focus Studios. White paper, one blue, type that comes into focus.
   Motion values (--lag, --e, --in, --py, --d, --hy) are written by app.js; defaults below are the resting state. */

:root {
  --bg: #FFFFFF;
  --stage: #EEF2FB;
  --shot-bg: #DCE3F3;
  --ink: #0A1022;
  --muted: #5B6478;
  --line: rgba(10, 16, 34, .1);
  --accent: #1F55F1;
  --on-accent: #FFFFFF;
  --on-accent-muted: #DCE4FD;

  --display: "Funnel Display", "Geist", ui-sans-serif, system-ui, sans-serif;
  --text: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --r-lg: 28px;
  --pill: 999px;
  --glide: cubic-bezier(.2, .9, .3, 1);
  --spring: cubic-bezier(.3, 1.5, .5, 1);

  --gx: clamp(16px, 4vw, 56px);
  --max: 1560px;
  --hh: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--hh) + 16px);
  overflow-x: clip;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.5 var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img { max-width: 100%; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }
.how :focus-visible, .top.light :focus-visible { outline-color: #FFFFFF; }

.wrap { width: min(100% - 2 * var(--gx), var(--max)); margin-inline: auto; }

.skip {
  position: fixed; left: 12px; top: -64px; z-index: 100;
  padding: 10px 16px; border-radius: var(--pill);
  background: var(--ink); color: #FFFFFF; text-decoration: none; font-weight: 500;
}
.skip:focus { top: 12px; }

.kicker {
  display: flex; align-items: center; gap: 10px; margin: 0;
  font: 500 12px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
}
.kicker::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* ---------- Buttons: one blue pill with a little depth, no glow ---------- */
.btn {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 28px; border-radius: var(--pill);
  font: 600 16px/1 var(--text); letter-spacing: -.005em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform .2s var(--glide), background-color .3s, color .3s;
}
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: transparent; transition: background-color .2s;
}
.btn-accent {
  color: var(--on-accent);
  background: var(--accent) linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 55%);
  box-shadow:
    inset 0 0 0 .5px rgba(255, 255, 255, .28),
    inset 0 1px 0 rgba(255, 255, 255, .3),
    0 1px 2px rgba(10, 16, 34, .22),
    0 6px 14px -8px rgba(10, 16, 34, .45);
}
@media (hover: hover) { .btn:hover::after { background: rgba(255, 255, 255, .08); } }
.btn:active::after { background: rgba(10, 16, 34, .1); }

/* Hover is a rack focus inside the label: the text leaves upward out of focus, a sharp copy rises in.
   The button itself never moves. On touch, app.js plays the same thing on a tap and when the button
   first reaches the middle of the screen (.hov), then resets without a transition (.snap). */
.btn-roll { position: relative; display: block; overflow: hidden; height: 1.3em; line-height: 1.3em; }
.btn-roll > span { display: block; transition: transform .55s var(--glide), filter .55s var(--glide), opacity .55s var(--glide); }
.btn-roll > span + span { position: absolute; inset: 0; text-align: center; transform: translate3d(0, 100%, 0); filter: blur(5px); opacity: 0; }
@media (hover: hover) {
  .btn:hover .btn-roll > span:first-child { transform: translate3d(0, -100%, 0); filter: blur(5px); opacity: 0; }
  .btn:hover .btn-roll > span + span { transform: none; filter: blur(0); opacity: 1; }
}
.btn.hov .btn-roll > span:first-child { transform: translate3d(0, -100%, 0); filter: blur(5px); opacity: 0; }
.btn.hov .btn-roll > span + span { transform: none; filter: blur(0); opacity: 1; }
.btn.hov::after { background: rgba(255, 255, 255, .08); }
.snap .btn-roll > span { transition: none; }
.btn-sm { height: 40px; padding: 0 18px; font-size: 14px; }
.btn-lg { height: 60px; padding: 0 36px; font-size: 17px; }

/* Plain text link: no underline at rest; on hover a line draws in from the left and leaves to the right */
.link { position: relative; display: inline-flex; align-items: center; gap: 6px; font-weight: 500; text-decoration: none; padding: 6px 0; }
.link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1.5px;
  background: currentColor; transform: scaleX(0); transform-origin: 100% 50%;
  transition: transform .5s var(--glide);
}
.link .arr { display: inline-block; transition: transform .45s var(--glide); }
@media (hover: hover) {
  .link:hover::after { transform: scaleX(1); transform-origin: 0 50%; }
  .link:hover .arr { transform: translateY(3px); }
}
.link.hov::after, .link:focus-visible::after { transform: scaleX(1); transform-origin: 0 50%; }
.link.hov .arr { transform: translateY(3px); }

/* ---------- Header: one floating glass pill with the brand, the sections, a sliding lens and the CTA ---------- */
@property --fade { syntax: "<color>"; inherits: true; initial-value: rgba(255, 255, 255, .82); }
@property --glass { syntax: "<color>"; inherits: true; initial-value: rgba(255, 255, 255, .58); }

.top {
  --glass: rgba(255, 255, 255, .52);
  --pill-fg: var(--ink);
  --pill-fg-soft: rgba(10, 16, 34, .6);
  --fade: rgba(255, 255, 255, .82);
  position: fixed; inset: 0 0 auto; z-index: 50;
  padding-top: 14px;
  color: var(--ink);
  pointer-events: none;
  transition: color .35s, --fade .35s, --glass .35s;
}
/* over the blue scene */
.top.light {
  --glass: rgba(255, 255, 255, .16);
  --pill-fg: #FFFFFF;
  --pill-fg-soft: rgba(255, 255, 255, .76);
  --fade: rgba(31, 85, 241, .8);
  color: #FFFFFF;
}
.top a, .pill { pointer-events: auto; }
.top.light .btn-accent { background: #FFFFFF; color: var(--accent); }

/* content scrolling under the header softens instead of clashing with it */
.top-fade {
  position: absolute; inset: 0 0 -30px; pointer-events: none;
  background: linear-gradient(to bottom, var(--fade), rgba(255, 255, 255, 0));
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent);
  mask-image: linear-gradient(to bottom, #000 40%, transparent);
  transition: opacity .35s;
}
.js .top:not(.scrolled):not(.light) .top-fade { opacity: 0; }

.top-in { position: relative; height: 56px; }

.pill {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  display: inline-flex; align-items: center; gap: 2px; padding: 6px;
  border-radius: var(--pill); isolation: isolate;
}
.pill-glass, .lens { position: absolute; border-radius: var(--pill); pointer-events: none; }
.pill-glass {
  inset: 0; z-index: -2;
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(170%) brightness(1.04);
  backdrop-filter: blur(16px) saturate(170%) brightness(1.04);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, .85),
    inset 0 0 0 1px rgba(255, 255, 255, .3),
    0 0 0 .5px rgba(10, 16, 34, .08),
    0 12px 32px -14px rgba(10, 30, 90, .4),
    0 2px 6px rgba(10, 30, 90, .08);
  transition: opacity .6s var(--glide), transform .6s var(--glide);
}
/* at the very top only the text shows; the glass grows in once scrolling starts */
.js .top:not(.scrolled):not(.light) .pill-glass { opacity: 0; transform: scale(.94); }
.lens {
  left: 0; top: 6px; bottom: 6px; width: 0; z-index: -1; opacity: 0;
  background:
    radial-gradient(120% 140% at 30% 0%, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 60%),
    rgba(255, 255, 255, .62);
  box-shadow:
    inset 0 1px 1px #FFFFFF,
    inset 0 0 0 1px rgba(31, 85, 241, .18),
    inset 0 -2px 6px rgba(31, 85, 241, .12),
    0 6px 14px -8px rgba(10, 30, 90, .45);
  will-change: transform, width;
}
.top.light .lens {
  background:
    radial-gradient(120% 140% at 30% 0%, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 60%),
    rgba(255, 255, 255, .2);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .7), inset 0 0 0 1px rgba(255, 255, 255, .35), 0 6px 14px -8px rgba(0, 20, 80, .5);
}
.pill-item {
  position: relative; display: inline-flex; align-items: center;
  height: 42px; padding: 0 18px; border-radius: var(--pill);
  font: 500 14.5px/1 var(--text); letter-spacing: -.005em; white-space: nowrap;
  color: var(--pill-fg-soft); text-decoration: none;
  transition: color .25s;
}
.pill-item[aria-current] { color: var(--pill-fg); }
@media (hover: hover) { .pill-item:hover { color: var(--pill-fg); } }
.pill-item:focus-visible { outline-offset: 2px; border-radius: var(--pill); }
.pill-item .sm { display: none; }
/* the brand is the pill's first item and the stop for the hero; phones keep just the mark */
.pill-brand { gap: 10px; padding: 0 18px 0 14px; margin-right: 4px; color: var(--pill-fg); font: 600 16.5px/1 var(--display); letter-spacing: -.015em; }
.pill-brand .brand-mark { flex: none; width: 22px; height: 22px; }
/* the CTA closes the pill; same height as the items, so the pill stays one even capsule */
.pill .top-cta { height: 42px; margin-left: 6px; }
.pill-brand.hov .brand-mark { animation: mark-snap .6s var(--spring); }
@keyframes mark-snap { from { transform: scale(1.3); } to { transform: none; } }

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .pill-glass { background: rgba(255, 255, 255, .94); }
  .top.light .pill-glass { background: rgba(255, 255, 255, .22); }
}

.brand {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font: 600 19px/1 var(--display); letter-spacing: -.015em;
}
.brand-mark {
  width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round; transition: stroke .35s;
}
/* the mark is a face: two pill eyes inside the focus corners; it blinks now and then */
.brand-mark .eyes { fill: var(--accent); stroke: none; transition: fill .35s; transform-box: fill-box; transform-origin: center; }
.js:not(.rm) .brand-mark .eyes { animation: blink 6s 2.5s infinite; }
@keyframes blink { 0%, 95.5%, 100% { transform: none; } 97% { transform: scaleY(.12); } }
.top.light .brand-mark { stroke: #FFFFFF; }
.top.light .brand-mark .eyes { fill: #FFFFFF; }


/* ---------- Hero ---------- */
.hero { position: relative; display: flex; min-height: 100vh; min-height: 100svh; padding: calc(var(--hh) + 5vh) 0 6vh; }
.hero-in {
  display: flex; flex-direction: column; justify-content: space-between; gap: 7vh;
  transform: translate3d(0, var(--hy, 0px), 0);
}
.hero-h {
  margin: 0;
  font: 600 clamp(60px, 13.2vw, 228px)/.86 var(--display);
  letter-spacing: -.055em;
}
.ln { display: block; }
/* far enough in that the S tucks under the bowl of the second p, clear of its descender */
.ln-2 { padding-left: 1.48em; }
.ln-r { display: block; }
.ln-i {
  display: inline-block;
  transform: translate3d(0, var(--lag, 0px), 0);
  filter: blur(calc(var(--d, 0) * 10px));
  opacity: calc(1 - var(--d, 0) * .7);
  will-change: transform;
}
.hero-h.sharp .ln-i { filter: none; opacity: 1; }
.js .ln-r { animation: rise 1s var(--glide) both; animation-delay: calc(80ms + var(--i) * 90ms); }
.js .hf { animation: fade-up 1s var(--glide) both; animation-delay: var(--dl, 0ms); }

.hero-foot { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 28px 48px; }
.hero-sub { margin: 0; max-width: 36ch; font-size: clamp(17px, 1.4vw, 21px); line-height: 1.45; color: var(--muted); text-wrap: pretty; }
.hero-cta { display: flex; align-items: center; gap: 28px; }

@keyframes rise { from { transform: translate3d(0, 34%, 0); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade-up { from { opacity: 0; transform: translate3d(0, 16px, 0); } to { opacity: 1; transform: none; } }

/* ---------- Work ---------- */
.work { padding-top: 22vh; }
.work-head { display: grid; gap: 24px; margin-bottom: 15vh; }
.work-lede {
  margin: 0; max-width: 16ch;
  font: 600 clamp(34px, 4.6vw, 74px)/1.02 var(--display); letter-spacing: -.035em;
  text-wrap: balance;
}

.project { margin-bottom: 24vh; }
.p-head { display: flex; align-items: flex-start; gap: clamp(10px, 1.4vw, 22px); margin-bottom: 6vh; }
.p-idx {
  margin-top: .85em; font: 500 clamp(12px, 1.05vw, 15px)/1 var(--mono); letter-spacing: .04em;
  color: var(--accent); opacity: var(--in, 1);
}
.p-name {
  margin: 0;
  font: 600 clamp(52px, 10.6vw, 180px)/.9 var(--display); letter-spacing: -.05em;
  translate: calc((1 - var(--in, 1)) * 9vw) 0;
  transform: translate3d(0, var(--lag, 0px), 0);
  will-change: transform, translate;
}
/* the display face sets r and n too tight at this tracking ("Eternity") */
.kern-rn { margin-right: .045em; }

/* Where the browser can tie animations to scrolling itself (Chrome, Safari 26+), the name slide and
   the hero drift run on the compositor instead of in JS, so they stay smooth on phones. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .js .p-name { animation: name-in linear both; animation-timeline: view(); animation-range: cover 8% cover 42%; }
    .js .p-idx { animation: idx-in linear both; animation-timeline: view(); animation-range: cover 8% cover 42%; }
    .hero { view-timeline: --hero block; }
    .js .hero-in { animation: hero-drift linear both; animation-timeline: --hero; animation-range: exit 0% exit 100%; }
  }
}
@keyframes name-in { from { translate: 9vw 0; animation-timing-function: cubic-bezier(.33, 1, .68, 1); } to { translate: 0 0; } }
@keyframes idx-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes hero-drift { from { translate: 0 0; } to { translate: 0 10vh; } }

/* The stage opens from a framed panel to full bleed as it enters, and closes as it leaves. */
.p-stage {
  --e: 1;
  position: relative;
  height: clamp(440px, 54vw, 86vh);
  background: var(--stage);
  container-type: size;
  overflow: hidden;
  clip-path: inset(
    calc((1 - var(--e)) * var(--fy))
    calc((1 - var(--e)) * var(--fx))
    round calc((1 - var(--e)) * var(--r-lg))
  );
}
/* how far in the closed frame sits; phones get a deeper frame so the opening reads there too */
.p-stage { --fx: max(var(--gx), (100% - var(--max)) / 2); --fy: 6vh; }
.how-bg, .how-veil { --fx: max(6vw, (100% - var(--max)) / 2); --fy: 6vw; --fr: 72px; }
.comp { position: absolute; left: 50%; top: 50%; translate: -50% -50%; aspect-ratio: 1.8; width: min(84cqw, 136.8cqh); }
.comp.trio { aspect-ratio: 1.56; width: min(80cqw, 124.8cqh); }
.comp.solo { aspect-ratio: 1.6; width: min(80cqw, 128cqh); }

.shot {
  position: absolute; margin: 0; overflow: hidden;
  background: var(--shot-bg);
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(10, 16, 34, .08), 0 30px 60px -30px rgba(10, 16, 34, .45);
  transform: translate3d(0, var(--py, 0px), 0) rotate(var(--rot, 0deg));
  will-change: transform;
}
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.shot.phone { border-radius: 13% / 6%; aspect-ratio: 600 / 1298; }
.shot.broken img { visibility: hidden; }
.shot.broken::after {
  content: attr(data-fallback);
  position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; text-align: center;
  font: 500 12px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}

.duo .desk { left: 0; top: 0; width: 84%; aspect-ratio: 1.6; }
.duo .phone { right: 0; top: 10%; height: 90%; }
.solo .desk { inset: 0; }

.trio .phone { top: 4%; height: 92%; }
.trio .phone:nth-child(1) { left: 0; --rot: -5deg; }
.trio .phone:nth-child(2) { left: 50%; translate: -50% -4%; z-index: 1; }
.trio .phone:nth-child(3) { right: 0; --rot: 5deg; }

.p-foot {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); align-items: start;
  gap: 32px 6vw; margin-top: 6vh;
}
.p-kind {
  margin: 0 0 14px; max-width: 20ch;
  font: 600 clamp(26px, 2.6vw, 42px)/1.08 var(--display); letter-spacing: -.025em;
  text-wrap: balance;
}
.p-line { margin: 0; max-width: 46ch; font-size: clamp(16px, 1.25vw, 19px); color: var(--muted); text-wrap: pretty; }
.p-meta { display: grid; gap: 14px; margin: 0 0 24px; }
.p-meta div { display: grid; grid-template-columns: 84px 1fr; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.p-meta dt { font: 500 11px/1.75 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.p-meta dd { margin: 0; font-size: 15px; }
.p-link {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 clamp(20px, 1.6vw, 24px)/1.2 var(--display); letter-spacing: -.01em;
  color: var(--accent); text-decoration: none;
}
.p-link { position: relative; padding-bottom: 4px; }
.p-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: currentColor; transform: scaleX(0); transform-origin: 100% 50%;
  transition: transform .5s var(--glide);
}
.p-link .arr { display: inline-block; transition: transform .45s var(--glide); }
@media (hover: hover) {
  .p-link:hover::after { transform: scaleX(1); transform-origin: 0 50%; }
  .p-link:hover .arr { transform: translate(3px, -3px); }
}
.p-link.hov::after, .p-link:focus-visible::after { transform: scaleX(1); transform-origin: 0 50%; }
.p-link.hov .arr { transform: translate(3px, -3px); }

/* ---------- How: the blue panel stays put, only the sentences scroll through it ----------
   Three layers: the blue panel (sticky), the sentences (native scroll) and a sticky front layer with
   the kicker, a blue veil the sentences fade under at the top, and the art for the sentence in focus. */
.how {
  --e: 1; position: relative; margin-top: 4vh; color: var(--on-accent);
  /* the "How" link lands with the first sentence already in the frame */
  scroll-margin-top: calc(-50vh - var(--hh) - 16px);
}
.how-pin, .how-front { position: sticky; top: 0; height: 100vh; }
.how-front { z-index: 2; margin-top: -100vh; pointer-events: none; }
/* Opens from a rounded card to full bleed on the way in; on the way out (right after it unpins)
   it shrinks back into a card with big round corners, and the kicker and art settle back with it. */
.how-bg, .how-veil {
  position: absolute; inset: 0;
  clip-path: inset(
    calc((1 - var(--e)) * var(--fy))
    calc((1 - var(--e)) * var(--fx))
    round calc((1 - var(--e)) * var(--fr))
  );
}
.how-head, .how-art { scale: calc(.92 + var(--e) * .08); opacity: clamp(0, calc(var(--e) * 1.6 - .3), 1); }
.how-bg { background: var(--accent); }
.how-veil {
  --va: calc(var(--hh) + 9vh); --vb: calc(var(--hh) + 19vh);
  background: linear-gradient(to bottom, var(--accent) var(--va), rgba(31, 85, 241, 0) var(--vb));
}
.how-head { position: absolute; left: 0; right: 0; top: calc(var(--hh) + 6vh); }
.how-in { position: relative; z-index: 1; margin-top: -100vh; padding: 88vh 0 80vh; }
.how .kicker { color: var(--on-accent-muted); }
.how .kicker::before { background: #FFFFFF; }
.dof { list-style: none; display: grid; gap: 36vh; max-width: 54%; margin: 0; padding: 0; }
.dof-ln { --d: 0; }
/* Defocus without CSS filters: the sharp glyphs fade out while a blurred text-shadow copy fades in.
   (filter: blur on this block drew a hairline along its top edge in iOS Safari.) */
.dof-t {
  --bl: 7px;
  display: inline-block; max-width: 10em;
  font: 600 clamp(38px, 5.2vw, 88px)/.98 var(--display); letter-spacing: -.045em;
  text-wrap: balance;
  color: rgba(255, 255, 255, calc((1 - var(--d)) * (1 - var(--d) * .55)));
  text-shadow: 0 0 calc(var(--d) * var(--bl)) rgba(255, 255, 255, calc(min(1, var(--d) * 1.6) * (1 - var(--d) * .55)));
}
.dof-s {
  display: block; margin-top: 38px;
  font: 500 13px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  color: var(--on-accent-muted); opacity: calc(1 - var(--d) * .85);
}

/* The art: a thin viewfinder on the right; its scene changes with the sentence in focus (rack focus) */
.how-art {
  position: absolute; top: 48vh; right: max(var(--gx), (100% - var(--max)) / 2);
  width: min(30vw, 420px, 52vh); aspect-ratio: 1; translate: 0 -50%;
}
.how-art .vf { position: absolute; width: 16px; height: 16px; }
.how-art .vf b { position: absolute; inset: 0; border: 0 solid rgba(255, 255, 255, .6); }
.how-art .tl { left: 0; top: 0; }
.how-art .tr { right: 0; top: 0; }
.how-art .bl { left: 0; bottom: 0; }
.how-art .br { right: 0; bottom: 0; }
.how-art .tl b { border-width: 1.5px 0 0 1.5px; border-top-left-radius: 4px; --dx: -1; --dy: -1; }
.how-art .tr b { border-width: 1.5px 1.5px 0 0; border-top-right-radius: 4px; --dx: 1; --dy: -1; }
.how-art .bl b { border-width: 0 0 1.5px 1.5px; border-bottom-left-radius: 4px; --dx: -1; --dy: 1; }
.how-art .br b { border-width: 0 1.5px 1.5px 0; border-bottom-right-radius: 4px; --dx: 1; --dy: 1; }
.how-art.snap .vf b { animation: af-snap .55s var(--spring); }

.scene {
  position: absolute; inset: 10%;
  opacity: 0; filter: blur(8px); transform: scale(.94);
  transition: opacity .6s var(--glide), filter .6s var(--glide), transform .8s var(--glide);
}
.scene.on { opacity: 1; filter: blur(0); transform: none; }
.scene svg { display: block; width: 100%; height: 100%; overflow: visible; fill: none; stroke: #FFFFFF; stroke-linecap: round; stroke-linejoin: round; }
.scene i { position: absolute; display: block; }
.how.idle .scene * { animation-play-state: paused !important; }

/* 1 · draft: a caret writes the lines, older lines get erased and written again */
.s0-l { stroke-width: 2.5; stroke-dasharray: 1 1; stroke-dashoffset: 0; }
.s0-h { stroke-width: 5; }
.s0-caret { fill: #FFFFFF; stroke: none; opacity: 0; }
.run .s0-l { animation: s0-line 6s linear calc(var(--i) * .55s) infinite both; }
.run .s0-caret { animation: s0-caret 6s linear infinite both; }
@keyframes s0-line {
  0% { stroke-dashoffset: 1; }
  8.33%, 78% { stroke-dashoffset: 0; }
  86%, 100% { stroke-dashoffset: -1; }
}
@keyframes s0-caret {
  0% { transform: translate(40px, 70px); opacity: 1; }
  8.33% { transform: translate(196px, 70px); }
  9.17% { transform: translate(40px, 100px); }
  17.5% { transform: translate(176px, 100px); }
  18.33% { transform: translate(40px, 124px); }
  26.67% { transform: translate(204px, 124px); }
  27.5% { transform: translate(40px, 148px); }
  35.83% { transform: translate(150px, 148px); }
  36.67% { transform: translate(40px, 172px); }
  45% { transform: translate(186px, 172px); opacity: 1; }
  53% { opacity: .1; } 61% { opacity: 1; } 69% { opacity: .1; } 77% { opacity: 1; } 85% { opacity: .1; } 93% { opacity: 1; }
  99.9% { transform: translate(186px, 172px); }
  100% { transform: translate(40px, 70px); opacity: 1; }
}

/* 2 · script: three identical tasks, braces close around them, they become one */
.s1-bx { stroke-width: 2.5; fill: #FFFFFF; fill-opacity: 0; transform-box: fill-box; transform-origin: center; }
.s1-br { stroke-width: 2.5; stroke-dasharray: 1 1; stroke-dashoffset: 0; }
.run .s1-a { animation: s1-a 5.2s var(--glide) infinite both; }
.run .s1-b { animation: s1-b 5.2s var(--glide) infinite both; }
.run .s1-c { animation: s1-c 5.2s var(--glide) infinite both; }
.run .s1-bl { animation: s1-bl 5.2s var(--glide) infinite both; }
.run .s1-brr { animation: s1-brr 5.2s var(--glide) infinite both; }
@keyframes s1-a {
  0% { opacity: 0; transform: translateX(0) scale(.6); }
  7%, 40% { opacity: 1; transform: translateX(0) scale(1); }
  54% { opacity: 1; transform: translateX(56px) scale(1); }
  58%, 100% { opacity: 0; transform: translateX(56px) scale(1); }
}
@keyframes s1-c {
  0%, 15% { opacity: 0; transform: translateX(0) scale(.6); }
  22%, 40% { opacity: 1; transform: translateX(0) scale(1); }
  54% { opacity: 1; transform: translateX(-56px) scale(1); }
  58%, 100% { opacity: 0; transform: translateX(-56px) scale(1); }
}
@keyframes s1-b {
  0%, 7% { opacity: 0; transform: scale(.6); fill-opacity: 0; }
  14%, 54% { opacity: 1; transform: scale(1); fill-opacity: 0; }
  60% { transform: scale(1.14); fill-opacity: 1; }
  67%, 86% { opacity: 1; transform: scale(1); fill-opacity: 1; }
  96%, 100% { opacity: 0; transform: scale(.9); fill-opacity: 1; }
}
@keyframes s1-bl {
  0%, 26% { opacity: 1; stroke-dashoffset: 1; transform: translateX(0); }
  38%, 40% { stroke-dashoffset: 0; transform: translateX(0); }
  54%, 86% { opacity: 1; stroke-dashoffset: 0; transform: translateX(48px); }
  96%, 100% { opacity: 0; stroke-dashoffset: 0; transform: translateX(48px); }
}
@keyframes s1-brr {
  0%, 26% { opacity: 1; stroke-dashoffset: 1; transform: translateX(0); }
  38%, 40% { stroke-dashoffset: 0; transform: translateX(0); }
  54%, 86% { opacity: 1; stroke-dashoffset: 0; transform: translateX(-48px); }
  96%, 100% { opacity: 0; stroke-dashoffset: 0; transform: translateX(-48px); }
}

/* 3 · play: a ball bounces with squash and stretch, turns into a rounded square in the air and back */
.s2-shadow { left: 34%; top: 76%; width: 32%; height: 6%; border-radius: 50%; background: rgba(4, 22, 90, .42); }
.s2-bounce { left: 40%; top: 20%; width: 20%; height: 20%; transform: translateY(180%); }
.s2-squash { inset: 0; transform-origin: 50% 100%; }
.s2-ball { inset: 0; border-radius: 50%; background: #FFFFFF; }
.run .s2-bounce { animation: s2-y 2.4s infinite both; }
.run .s2-squash { animation: s2-sq 2.4s ease-in-out infinite both; }
.run .s2-ball { animation: s2-ball 2.4s cubic-bezier(.45, 0, .2, 1) infinite both; }
.run .s2-shadow { animation: s2-sh 2.4s infinite both; }
@keyframes s2-y {
  0%, 50% { transform: translateY(0); animation-timing-function: cubic-bezier(.5, 0, .9, .5); }
  25%, 75% { transform: translateY(180%); animation-timing-function: cubic-bezier(.1, .5, .5, 1); }
  100% { transform: translateY(0); }
}
@keyframes s2-sq {
  0%, 12%, 38%, 62%, 88%, 100% { transform: none; }
  21%, 71% { transform: scale(.9, 1.12); }
  25%, 75% { transform: scale(1.32, .68); }
  31%, 81% { transform: scale(.94, 1.08); }
}
@keyframes s2-ball {
  0%, 25% { transform: rotate(0deg); border-radius: 50%; }
  50% { transform: rotate(90deg); border-radius: 26%; }
  75% { transform: rotate(180deg); border-radius: 26%; }
  100% { transform: rotate(270deg); border-radius: 50%; }
}
@keyframes s2-sh {
  0%, 50% { transform: scale(.5); opacity: .35; animation-timing-function: cubic-bezier(.5, 0, .9, .5); }
  25%, 75% { transform: scale(1.05); opacity: 1; animation-timing-function: cubic-bezier(.1, .5, .5, 1); }
  100% { transform: scale(.5); opacity: .35; }
}

/* ---------- Contact: project 04 ---------- */
.contact { padding: 24vh 0 14vh; }
.yours { font-size: clamp(72px, 15vw, 260px); }
.slot {
  display: grid; justify-items: center; align-content: center; gap: 22px;
  min-height: clamp(340px, 46vh, 540px); padding: 48px 24px;
  text-align: center;
  border: 1.5px dashed rgba(31, 85, 241, .42); border-radius: var(--r-lg);
}
.slot-note { margin: 0; font: 500 12px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.slot-text {
  margin: 0 0 6px; max-width: 16ch;
  font: 600 clamp(30px, 3.6vw, 56px)/1.04 var(--display); letter-spacing: -.035em;
  text-wrap: balance;
}
.slot-mail { font: 500 14px/1.4 var(--mono); letter-spacing: .02em; color: var(--muted); text-decoration: none; }
.slot-mail:hover, .slot-mail:active { color: var(--accent); }
.slot-who { margin: 0; font-size: 15px; color: var(--muted); }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); }
.foot-in {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px;
  padding: 28px 0 calc(28px + env(safe-area-inset-bottom));
  font-size: 14px; color: var(--muted);
}
.foot-r { display: flex; flex-wrap: wrap; gap: 22px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* ---------- Reveal ---------- */
.rv { transition: opacity .9s var(--glide), transform 1s var(--glide); transition-delay: calc(var(--i, 0) * 90ms); }
.ready:not(.rm) .rv:not(.in) { opacity: 0; transform: translate3d(0, 24px, 0); }

/* ---------- The focus frame ---------- */
/* Lives in page coordinates, so native scrolling carries it; JS only moves it between anchors */
.af {
  position: absolute; left: 0; top: 0; z-index: 30; width: 0; height: 0;
  pointer-events: none; opacity: 0; color: var(--accent);
  transition: color .35s;
}
.af.light { color: #FFFFFF; }
.af .c { position: absolute; left: 0; top: 0; width: var(--cs, 18px); height: var(--cs, 18px); will-change: transform; }
.af .c b { position: absolute; inset: 0; border: 0 solid currentColor; }
.af .tl b { border-width: 2px 0 0 2px; border-top-left-radius: 5px; --dx: -1; --dy: -1; }
.af .tr b { border-width: 2px 2px 0 0; border-top-right-radius: 5px; --dx: 1; --dy: -1; }
.af .bl b { border-width: 0 0 2px 2px; border-bottom-left-radius: 5px; --dx: -1; --dy: 1; }
.af .br b { border-width: 0 2px 2px 0; border-bottom-right-radius: 5px; --dx: 1; --dy: 1; }
.af.lock .c b { animation: af-snap .55s var(--spring); }
@keyframes af-snap { from { transform: translate(calc(var(--dx) * 9px), calc(var(--dy) * 9px)); } to { transform: none; } }
.af-label { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 8px; will-change: transform; }

/* The operator: the logo with eyes. Separate layers for hop, squash and gaze so they never fight. */
.mo { --ms: 38px; position: relative; flex: none; width: var(--ms); height: var(--ms); pointer-events: auto; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mo-hop, .mo-body { position: absolute; inset: 0; }
.mo-body { transform-origin: 50% 100%; }
.mo-svg { display: block; width: 100%; height: 100%; overflow: visible; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.mo-c { stroke-width: 2; }
.mo-eyes { fill: currentColor; stroke: none; transform-box: fill-box; transform-origin: center; transition: transform .09s; }
.mo.blink .mo-eyes { transform: scaleY(.12); }
.mo-happy, .mo-sleep { stroke-width: 1.8; opacity: 0; }
.mo[data-mood="happy"] .mo-eyes, .mo[data-mood="sleep"] .mo-eyes { opacity: 0; }
.mo[data-mood="happy"] .mo-happy, .mo[data-mood="sleep"] .mo-sleep { opacity: 1; }

/* ---------- Kinetic type: two outline rows that slide against each other as you scroll ---------- */
.kinetic { padding: 4vh 0 16vh; overflow: hidden; pointer-events: none; user-select: none; }
.kt-row {
  display: flex; align-items: center; gap: .3em; width: max-content; white-space: nowrap;
  font: 600 clamp(56px, 9.6vw, 164px)/1.04 var(--display); letter-spacing: -.045em;
  will-change: translate;
}
.kt-row span { color: transparent; -webkit-text-stroke: 1.5px rgba(10, 16, 34, .22); }
.kt-row svg { flex: none; width: .6em; height: .6em; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.kt-row svg rect { fill: var(--accent); stroke: none; }
.kt-row b { font-weight: 600; color: var(--accent); }
.kt-1 { translate: calc(var(--p, .5) * -30% + 4%) 0; }
.kt-2 { translate: calc(var(--p, .5) * 30% - 26%) 0; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .kinetic { view-timeline: --kt block; }
    .js .kt-1 { animation: kt-l linear both; animation-timeline: --kt; animation-range: cover 0% cover 100%; }
    .js .kt-2 { animation: kt-r linear both; animation-timeline: --kt; animation-range: cover 0% cover 100%; }
  }
}
@keyframes kt-l { from { translate: 4% 0; } to { translate: -26% 0; } }
@keyframes kt-r { from { translate: -26% 0; } to { translate: 4% 0; } }

/* ---------- Phone ---------- */
@media (max-width: 760px) {
  :root { --hh: 60px; --r-lg: 22px; }
  body { font-size: 16px; }
  /* header: one centred pill, the brand mark is its first item and stands in for "Studio" */
  .top { padding-top: 10px; }
  .top-in { height: 50px; }
  .top-cta, .pill-name { display: none; }
  .pill-brand { justify-content: center; width: 46px; padding: 0; margin-right: 0; }
  .pill-brand .brand-mark { width: 21px; height: 21px; }
  .pill { padding: 5px; }
  .lens { top: 5px; bottom: 5px; }
  .pill-item { height: 38px; padding: 0 12px; font-size: 14px; }
  .pill-item .lg { display: none; }
  .pill-item .sm { display: inline; }
  .btn-sm { height: 38px; padding: 0 16px; }

  .hero { padding-top: calc(var(--hh) + 4vh); }
  .hero-in { gap: 6vh; }
  /* taller lines so the descender of "Apps." clears the W below it */
  .hero-h { font-size: 17.4vw; line-height: .98; letter-spacing: -.05em; }
  .ln-2 { padding-left: .5em; }
  .hero-foot { flex-direction: column; align-items: stretch; gap: 26px; }
  .hero-cta { flex-direction: column; align-items: stretch; gap: 18px; }
  .hero-cta .link { align-self: center; }

  .work { padding-top: 16vh; }
  .work-head { margin-bottom: 9vh; }
  .project { margin-bottom: 16vh; }
  .p-head { margin-bottom: 4vh; }
  .p-name { font-size: 14vw; }
  .p-stage { height: max(260px, 76vw); }
  .p-stage { --fx: 8vw; --fy: 4vh; }
  .how-bg, .how-veil { --fx: 7vw; --fy: 7vw; --fr: 40px; }
  .comp { width: min(92cqw, 136.8cqh); }
  .comp.trio { width: min(90cqw, 124.8cqh); }
  .comp.solo { width: min(92cqw, 128cqh); }
  .shot { border-radius: 6px; }
  .p-foot { grid-template-columns: 1fr; gap: 28px; margin-top: 4vh; }

  /* phone: the art sits top right in a solid blue band; sentences come into focus below it */
  .how { scroll-margin-top: calc(-40vh - var(--hh) - 16px); }
  .how-veil { --va: 36vh; --vb: 45vh; }
  .how-head { top: calc(var(--hh) + 3vh); }
  .how-art { top: calc(var(--hh) + 1.5vh); right: var(--gx); width: min(44vw, 28vh); translate: none; }
  .how-art .vf { width: 12px; height: 12px; }
  .how-in { padding: 100vh 0 66vh; }
  .dof { gap: 30vh; max-width: none; }
  .dof-t { --bl: 4.5px; font-size: 10.4vw; }
  .dof-s { font-size: 12px; margin-top: 28px; }

  .mo { --ms: 30px; }
  .kinetic { padding: 2vh 0 10vh; }
  .kt-row span { -webkit-text-stroke-width: 1.2px; }

  .contact { padding: 16vh 0 10vh; }
  .yours { font-size: 26vw; }
  /* room at the top for the operator, who sits inside this frame */
  .slot { min-height: 340px; padding: 64px 18px 40px; gap: 18px; }
  .slot .btn { width: 100%; }
}

.rm .scene * { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scene * { animation: none !important; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-delay: 0ms !important;
    transition-duration: .01ms !important; transition-delay: 0ms !important;
  }
}
