/* ==========================================================================
   FI Studio — case-study pages, sketch version 2
   Every scroll effect is driven by one custom property, --p (0 → 1), that
   case-v2.js writes on each [data-scrub] element. CSS decides what --p does,
   so the motion is transform / opacity / clip-path only and stays on the
   compositor. Desktop and mobile each get their own media and proportions.
   Builds on home-v2.css (tokens, links, reveal, cursor, curtain, fonts).
   ========================================================================== */

body.cx-page .page { padding-top: 0; overflow: visible; background: #000; }
body.cx-page { --cx-r: clamp(14px, 1.8vw, 30px); }

/* header floats over the hero, then turns solid (same behaviour as the home page) */
body.cx-page .topbar { background: transparent; border-bottom-color: transparent; transition: background-color .5s var(--hv-expo), border-color .5s var(--hv-expo); }
body.cx-page .topbar:not(.hv-solid) { mix-blend-mode: screen; }
body.cx-page .topbar.hv-solid { background: #000; border-bottom-color: rgba(247, 244, 239, .1); }
body.menu-open.cx-page .topbar { mix-blend-mode: normal; background: #000; }

/* reading progress */
.cx-progress { position: fixed; left: 0; right: 0; top: 0; z-index: 30; height: 3px; background: var(--pink); transform: scaleX(var(--p, 0)); transform-origin: 0 50%; pointer-events: none; }

/* ---------- media primitives ---------- */
.cx-media { position: relative; display: block; overflow: hidden; background: #0c0c0c; aspect-ratio: var(--ar-d, 16 / 9); }
.cx-media img, .cx-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); }
.cx-media video { opacity: 0; transition: opacity .6s; }
.cx-media video.is-ready { opacity: 1; }
.cx-only-mob { display: none !important; }

/* ---------- hero: pinned, recedes as the story slides over it ---------- */
.cx-hero { position: sticky; top: 0; z-index: 0; height: 100vh; height: 100svh; overflow: hidden; background: #000; }
.cx-hero-stage {
  position: absolute; inset: 0; overflow: hidden;
  transform-origin: 50% 42%;
  transform: scale(calc(1 - var(--p, 0) * .1));
  border-radius: calc(var(--p, 0) * 32px);
  opacity: calc(1 - var(--p, 0) * .65);
  will-change: transform;
}
.cx-hero .cx-media { position: absolute; inset: 0; aspect-ratio: auto; transform: scale(calc(1.08 + var(--p, 0) * .1)); transform-origin: var(--pos, 50% 50%); }
.cx-hero .cx-media.cx-only-desk, .cx-hero .cx-media:not(.cx-only-mob) { --pos: var(--heropos, 50% 50%); }
html.hv-js .cx-hero .cx-media { animation: cx-settle 2.4s var(--hv-expo) both; }
@keyframes cx-settle { from { transform: scale(1.26); } to { transform: scale(1.08); } }
.cx-hero-scrim { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(to bottom, rgba(0,0,0,.6) 0%, rgba(0,0,0,0) 24%), linear-gradient(to top, rgba(0,0,0,.9) 0%, rgba(0,0,0,.45) 28%, rgba(0,0,0,0) 60%); }
.cx-hero-ui { position: absolute; inset: auto 0 0; z-index: 3; padding: 0 var(--hv-g) clamp(22px, 4.4vh, 48px); transform: translate3d(0, calc(var(--p, 0) * -70px), 0); opacity: calc(1 - var(--p, 0) * 1.6); }
.cx-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin: 0 0 clamp(8px, 1.4vh, 16px); font-size: clamp(11px, .95vw, 14px); font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.cx-hero-meta a { display: inline-flex; align-items: center; gap: 10px; }
.cx-hero-meta a svg { width: 12px; height: 12px; transform: rotate(-135deg); }
.cx-hero-meta span { color: rgba(247, 244, 239, .82); }
.cx-hero-meta span::before { content: ""; display: inline-block; width: 28px; height: 2px; margin-right: 22px; background: var(--pink); vertical-align: middle; }
.cx-title { margin: 0 0 0 -.04em; font-size: clamp(54px, 13vw, 250px); font-weight: 600; line-height: .86; letter-spacing: -.055em; overflow: hidden; padding: .06em 0 .12em; }
.cx-title > span { display: inline-block; white-space: nowrap; }
html.hv-js .cx-title > span { transform: translateY(112%); animation: hv-up 1.3s var(--hv-expo) .25s forwards; }
html.hv-js .cx-hero-meta { opacity: 0; animation: cx-fade .9s .7s forwards; }
@keyframes cx-fade { to { opacity: 1; } }
.cx-hero-foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: clamp(12px, 2.4vh, 26px); padding-top: clamp(12px, 2vh, 20px); border-top: 1px solid var(--hv-line); font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: rgba(247, 244, 239, .78); }
.cx-hero-foot i { font-style: normal; display: inline-block; animation: cx-nudge 1.8s var(--hv-inout) infinite; }
@keyframes cx-nudge { 50% { transform: translateY(6px); } }

/* everything after the hero rides over it */
.cx-body { position: relative; z-index: 2; background: #000; border-radius: var(--cx-r) var(--cx-r) 0 0; margin-top: -1px; }

/* ---------- intro ---------- */
.cx-intro { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(14px, 2vw, 34px); padding: clamp(70px, 13vh, 170px) var(--hv-g) clamp(60px, 11vh, 150px); }
.cx-facts { grid-column: 1 / 4; margin: 0; align-self: start; position: sticky; top: calc(var(--header-h) + 30px); }
.cx-facts div { padding: 14px 0; border-top: 1px solid var(--hv-line); }
.cx-facts div:last-child { border-bottom: 1px solid var(--hv-line); }
.cx-facts dt { margin: 0 0 6px; font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--hv-dim); }
.cx-facts dd { margin: 0; font-size: clamp(15px, 1.2vw, 18px); font-weight: 500; line-height: 1.5; }
.cx-facts dd span { display: block; }
.cx-copy { grid-column: 5 / -1; }
.cx-lead { margin: 0; font-size: clamp(26px, 3.5vw, 60px); font-weight: 500; line-height: 1.14; letter-spacing: -.035em; }
.cx-lead .w { display: inline-block; transition: opacity .25s linear; }
html.hv-js .cx-lead .w { opacity: .16; }
html.hv-js .cx-lead .w.is-on { opacity: 1; }
.cx-detail { margin: clamp(26px, 5vh, 56px) 0 0; max-width: 54ch; font-size: clamp(16px, 1.35vw, 21px); line-height: 1.65; color: rgba(247, 244, 239, .76); }

/* ---------- panels ---------- */
.cx-panel { position: relative; padding: 0 var(--hv-g); margin: 0 0 clamp(26px, 6vh, 90px); }
.cx-panel--full { padding: 0; }
.cx-panel-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--cx-r);
  /* scrubbed entrance: rises, un-clips and settles as it scrolls into view */
  clip-path: inset(calc((1 - var(--p, 1)) * 14%) calc((1 - var(--p, 1)) * 7%) 0 round var(--cx-r));
  transform: translate3d(0, calc((1 - var(--p, 1)) * 90px), 0);
  will-change: transform, clip-path;
}
.cx-panel--full .cx-panel-frame { border-radius: 0; clip-path: inset(calc((1 - var(--p, 1)) * 10%) calc((1 - var(--p, 1)) * 5%) 0 round calc((1 - var(--p, 1)) * 30px)); }
.cx-panel-frame .cx-media { transform: scale(calc(1.16 - var(--p, 1) * .16)); transform-origin: 50% 60%; }
.cx-cap { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin: 0; padding: 14px 0 0; font-size: clamp(11px, .95vw, 13px); font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--hv-dim); }
.cx-panel--full .cx-cap { padding: 14px var(--hv-g) 0; }
.cx-cap b { color: var(--pink); font-weight: 600; margin-right: 12px; }

/* two side by side */
.cx-duo { display: grid; grid-template-columns: var(--cols, 1fr 1fr); gap: clamp(14px, 2vw, 34px); align-items: end; }
.cx-duo > :nth-child(2) .cx-panel-frame { transform: translate3d(0, calc((1 - var(--p, 1)) * 170px), 0); }

/* three in a row (drift at different rates) */
.cx-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(10px, 1.4vw, 24px); }
.cx-trio > :nth-child(1) .cx-panel-frame { transform: translate3d(0, calc((1 - var(--p, 1)) * 60px), 0); }
.cx-trio > :nth-child(2) .cx-panel-frame { transform: translate3d(0, calc((1 - var(--p, 1)) * 150px), 0); }
.cx-trio > :nth-child(3) .cx-panel-frame { transform: translate3d(0, calc((1 - var(--p, 1)) * 240px), 0); }

/* ---------- zoom: a card grows to fill the screen while the page is held ---------- */
.cx-zoom { position: relative; height: 230vh; margin: clamp(20px, 6vh, 90px) 0; }
.cx-zoom-pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; place-items: center; overflow: hidden; }
.cx-zoom-card {
  position: relative;
  width: 100vw;
  height: 100vh; height: 100svh;
  overflow: hidden;
  transform: scale(calc(var(--z0, .5) + (1 - var(--z0, .5)) * var(--p, 0)));
  border-radius: calc((1 - var(--p, 0)) * 60px);
  will-change: transform;
  background: var(--zbg, #0c0c0c);
}
.cx-zoom-card .cx-media { position: absolute; inset: 0; aspect-ratio: auto; background: transparent; }
.cx-zoom-card .cx-media img, .cx-zoom-card .cx-media video { object-fit: var(--fit, cover); }
.cx-zoom-cap {
  position: absolute; left: var(--hv-g); bottom: clamp(20px, 5vh, 50px); z-index: 2;
  margin: 0; font-size: clamp(11px, .95vw, 13px); font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--zcap, #f7f4ef);
  opacity: clamp(0, calc((var(--p, 0) - .78) * 6), 1);
  transform: translate3d(0, calc((1 - var(--p, 0)) * 30px), 0);
}
.cx-zoom-cap b { color: var(--pink); font-weight: 600; margin-right: 12px; }
.cx-zoom-word {
  position: absolute; inset: 0; z-index: 0; display: grid; place-items: center; margin: 0; pointer-events: none;
  font-size: clamp(60px, 15vw, 280px); font-weight: 700; letter-spacing: -.06em; line-height: 1; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1.5px rgba(247, 244, 239, .28);
  opacity: calc(1 - var(--p, 0) * 2.2);
  transform: scale(calc(1 + var(--p, 0) * .5));
}

/* ---------- next project ---------- */
.cx-next { position: relative; display: block; height: 100vh; height: 100svh; overflow: hidden; color: inherit; isolation: isolate; }
.cx-next .cx-media { position: absolute; inset: 0; aspect-ratio: auto; z-index: -1; transform: scale(calc(1.3 - var(--p, 1) * .3)); filter: brightness(calc(.35 + var(--p, 1) * .25)); will-change: transform; transition: filter .6s; }
.cx-next-ui { position: absolute; inset: auto 0 0; padding: 0 var(--hv-g) clamp(26px, 6vh, 64px); }
.cx-next-ui small { display: flex; align-items: center; gap: 14px; font-size: clamp(11px, .95vw, 14px); font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.cx-next-ui small::before { content: ""; width: 34px; height: 2px; background: var(--pink); }
.cx-next-ui strong { display: flex; align-items: baseline; gap: .2em; margin-top: clamp(8px, 1.6vh, 18px); font-size: clamp(54px, 13vw, 250px); font-weight: 600; line-height: .9; letter-spacing: -.055em; transform: translate3d(calc((1 - var(--p, 1)) * -8vw), 0, 0); }
.cx-next-ui strong svg { width: .5em; height: .5em; flex: none; color: var(--pink); transition: transform .6s var(--hv-expo); }
@media (hover: hover) {
  .cx-next:hover .cx-media { filter: brightness(.85); }
  .cx-next:hover strong svg { transform: translate(.08em, -.08em); }
}

/* ==========================================================================
   Mobile / tablet — its own media, its own proportions
   ========================================================================== */
@media (max-width: 980px) {
  .cx-only-desk { display: none !important; }
  .cx-only-mob { display: block !important; }
  .cx-media { aspect-ratio: var(--ar-m, var(--ar-d, 4 / 5)); }

  body.cx-page .topbar, body.cx-page .topbar:not(.hv-solid) { background: #000; border-bottom-color: rgba(255, 255, 255, .12); mix-blend-mode: normal; }
  .cx-progress { top: var(--header-h); z-index: 21; }
  .cx-hero { padding-top: var(--header-h); }
  .cx-hero-stage { inset: var(--header-h) 0 0; transform-origin: 50% 30%; }
  .cx-hero .cx-media.cx-only-mob { background: var(--herobg-m, #0c0c0c); }
  .cx-hero .cx-media.cx-only-mob img, .cx-hero .cx-media.cx-only-mob video { object-fit: var(--herofit-m, cover); object-position: var(--heropos-m, 50% 50%); }
  .cx-hero-scrim { background: linear-gradient(to top, rgba(0,0,0,.94) 0%, rgba(0,0,0,.55) 30%, rgba(0,0,0,0) 62%); }
  .cx-hero-ui { padding: 0 16px max(18px, env(safe-area-inset-bottom)); }
  .cx-title { font-size: clamp(50px, 17vw, 140px); }
  .cx-title > span { white-space: normal; }

  .cx-intro { display: block; padding: 56px 16px 60px; }
  .cx-facts { position: static; display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; margin-bottom: 40px; }
  .cx-facts div:last-child { border-bottom: 0; }
  .cx-facts div:nth-last-child(-n+2) { border-bottom: 1px solid var(--hv-line); }
  .cx-lead { font-size: clamp(25px, 7vw, 44px); line-height: 1.16; }

  .cx-panel { padding: 0 16px; margin-bottom: 22px; }
  .cx-panel--full, .cx-panel--bleed-mob { padding: 0; }
  .cx-panel--bleed-mob .cx-panel-frame { border-radius: 0; }
  .cx-panel-frame { transform: translate3d(0, calc((1 - var(--p, 1)) * 50px), 0); }
  .cx-cap { padding-top: 10px; }
  .cx-panel--bleed-mob .cx-cap { padding: 10px 16px 0; }
  .cx-duo, .cx-trio { display: block; }
  .cx-duo > * + *, .cx-trio > * + * { margin-top: 22px; }
  .cx-duo > :nth-child(2) .cx-panel-frame, .cx-trio > * .cx-panel-frame { transform: translate3d(0, calc((1 - var(--p, 1)) * 50px), 0) !important; }
  .cx-trio { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .cx-trio > * + * { margin-top: 0; }

  /* no long pin on phones: the zoom becomes a normal panel that grows in as it enters */
  .cx-zoom { height: auto; margin: 0 0 22px; }
  .cx-zoom-pin { position: static; height: auto; display: block; overflow: visible; }
  .cx-zoom-card { --z0: .78; width: 100%; height: auto; aspect-ratio: var(--ar-m, 1 / 1); border-radius: calc((1 - var(--p, 0)) * 34px); }
  .cx-zoom-cap { position: static; padding: 10px 16px 0; opacity: 1; transform: none; color: var(--hv-dim); }
  .cx-zoom-word { display: none; }
  .cx-next-ui { padding: 0 16px max(24px, env(safe-area-inset-bottom)); }
  .cx-next-ui strong { font-size: clamp(50px, 17vw, 140px); flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  .cx-hero-foot i { animation: none; }
  html.hv-js .cx-hero .cx-media, html.hv-js .cx-title > span, html.hv-js .cx-hero-meta { animation: none; transform: none; opacity: 1; }
}

/* ==========================================================================
   Extra blocks (Metroboard): chapter headings, horizontal gallery + lightbox,
   scrolling website screens, self-playing videos
   ========================================================================== */
.cx-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(14px, 2vw, 34px); align-items: end; padding: clamp(60px, 12vh, 150px) var(--hv-g) clamp(24px, 4vh, 48px); }
.cx-head .hv-kicker { grid-column: 1 / -1; margin-bottom: clamp(12px, 2vh, 22px); }
.cx-head h2 { grid-column: 1 / 9; margin: 0; font-size: clamp(38px, 7vw, 128px); font-weight: 600; line-height: .94; letter-spacing: -.05em; }
.cx-head p:not(.hv-kicker) { grid-column: 9 / -1; margin: 0; font-size: clamp(15px, 1.25vw, 19px); line-height: 1.55; color: var(--hv-dim); }

/* ---- horizontal gallery: vertical scroll drives it sideways while pinned ---- */
.cx-hs { position: relative; height: calc(100vh + var(--dx, 0) * 1px); }
.cx-hs-pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.cx-hs-track { display: flex; align-items: center; gap: clamp(12px, 1.6vw, 28px); padding: 0 var(--hv-g); width: max-content; transform: translate3d(calc(var(--p, 0) * var(--dx, 0) * -1px), 0, 0); will-change: transform; }
.cx-shot { position: relative; flex: none; height: clamp(300px, 62vh, 720px); aspect-ratio: 3 / 2; padding: 0; border: 0; border-radius: var(--cx-r); overflow: hidden; background: #111; cursor: zoom-in; }
.cx-shot:nth-child(even) { height: clamp(240px, 46vh, 540px); align-self: flex-end; margin-bottom: 3vh; }
.cx-shot:nth-child(3n) { align-self: flex-start; margin-top: 2vh; }
.cx-shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--hv-expo); }
@media (hover: hover) { .cx-shot:hover img { transform: scale(1.05); } }
.cx-shot:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.cx-hs-bar { position: absolute; left: var(--hv-g); right: var(--hv-g); bottom: clamp(18px, 4vh, 40px); height: 2px; background: var(--hv-line); }
.cx-hs-bar i { display: block; height: 100%; background: var(--pink); transform: scaleX(var(--p, 0)); transform-origin: 0 50%; }
.cx-hs-hint { position: absolute; left: var(--hv-g); top: calc(var(--header-h) + 18px); margin: 0; font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--hv-dim); }

/* ---- lightbox ---- */
.cx-lb { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(0, 0, 0, .96); opacity: 0; visibility: hidden; transition: opacity .35s, visibility 0s linear .35s; }
.cx-lb.is-open { opacity: 1; visibility: visible; transition: opacity .35s; }
.cx-lb img { max-width: min(94vw, 1800px); max-height: 86vh; max-height: 86svh; border-radius: 8px; transform: scale(.94); opacity: 0; transition: transform .7s var(--hv-expo), opacity .35s; }
.cx-lb.is-open img.is-ready { transform: none; opacity: 1; }
.cx-lb button { position: absolute; display: grid; place-items: center; width: 56px; height: 56px; border: 1px solid rgba(247, 244, 239, .3); border-radius: 50%; background: rgba(0, 0, 0, .5); color: var(--ink); cursor: pointer; transition: background-color .3s, color .3s, border-color .3s; }
.cx-lb button svg { width: 18px; height: 18px; }
@media (hover: hover) { .cx-lb button:hover { background: var(--ink); border-color: var(--ink); color: #000; } }
.cx-lb button:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.cx-lb-close { right: clamp(14px, 2.4vw, 34px); top: clamp(14px, 2.4vw, 34px); }
.cx-lb-prev { left: clamp(14px, 2.4vw, 34px); top: 50%; margin-top: -28px; }
.cx-lb-next { right: clamp(14px, 2.4vw, 34px); top: 50%; margin-top: -28px; }
.cx-lb-prev svg { transform: rotate(-135deg); } .cx-lb-next svg { transform: rotate(45deg); }

/* ---- website screens: the page scrolls inside its frame as you scroll past ---- */
.cx-screens { display: grid; grid-template-columns: var(--cols, 1fr); gap: clamp(14px, 2vw, 34px); align-items: start; justify-content: center; }
.cx-screen { border-radius: var(--cx-r); overflow: hidden; background: #161616; border: 1px solid rgba(247, 244, 239, .12); max-width: var(--maxw, none); width: 100%; justify-self: center; }
.cx-screen-bar { display: flex; gap: 7px; padding: 12px 14px; background: #1d1d1d; }
.cx-screen-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(247, 244, 239, .22); }
.cx-screen-view { position: relative; aspect-ratio: var(--ar-d, 16 / 10); overflow: hidden; }
.cx-screen-view img { display: block; width: 100%; height: auto; object-fit: fill; transform: translate3d(0, calc(var(--p, 0) * var(--dy, 0) * -1px), 0); will-change: transform; }

/* ---- videos that play by themselves (YouTube, muted, in view) ---- */
.cx-vids { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(22px, 3vw, 50px) clamp(14px, 2vw, 34px); }
.cx-yt { margin: 0; }
.cx-yt-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--cx-r); overflow: hidden; background: #111; clip-path: inset(calc((1 - var(--p, 1)) * 12%) calc((1 - var(--p, 1)) * 6%) 0 round var(--cx-r)); transform: translate3d(0, calc((1 - var(--p, 1)) * 80px), 0); }
.cx-yt-frame img, .cx-yt-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.cx-yt-frame button { position: absolute; inset: 0; display: grid; place-items: center; border: 0; background: rgba(0, 0, 0, .18); cursor: pointer; }
.cx-yt-frame button span { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--pink); color: #fff; transition: transform .5s var(--hv-expo); }
.cx-yt-frame button svg { width: 22px; height: 22px; margin-left: 4px; }
@media (hover: hover) { .cx-yt-frame button:hover span { transform: scale(1.12); } }
.cx-yt.is-live button { display: none; }
.cx-yt figcaption { padding-top: 12px; font-size: clamp(11px, .95vw, 13px); font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--hv-dim); }

@media (max-width: 980px) {
  .cx-head { display: block; padding: 60px 16px 22px; }
  .cx-head h2 { font-size: clamp(36px, 11vw, 72px); }
  .cx-head p:not(.hv-kicker) { margin-top: 14px; }
  /* gallery becomes a native swipe carousel */
  .cx-hs { height: auto; margin-bottom: 22px; }
  .cx-hs-pin { position: static; height: auto; display: block; overflow: visible; }
  .cx-hs-track { width: auto; transform: none; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 16px; padding: 0 16px; gap: 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .cx-hs-track::-webkit-scrollbar { display: none; }
  .cx-shot, .cx-shot:nth-child(even), .cx-shot:nth-child(3n) { height: auto; width: 84vw; aspect-ratio: 3 / 2; align-self: auto; margin: 0; scroll-snap-align: start; border-radius: 12px; }
  .cx-hs-bar { position: static; margin: 16px 16px 0; }
  .cx-hs-hint { position: static; padding: 0 16px 12px; }
  .cx-lb button { width: 46px; height: 46px; }
  .cx-lb-prev, .cx-lb-next { top: auto; bottom: 18px; margin: 0; }
  .cx-screens { grid-template-columns: 1fr; }
  .cx-screen-view { aspect-ratio: var(--ar-m, 4 / 5); }
  .cx-vids { grid-template-columns: 1fr; gap: 22px; }
  .cx-yt-frame { transform: translate3d(0, calc((1 - var(--p, 1)) * 40px), 0); border-radius: 12px; }
  .cx-yt-frame button span { width: 60px; height: 60px; }
}

/* transparent PNGs keep the backgrounds they were designed for */
.cx-panel-frame { --mbg: initial; }
.cx-body .cx-panel .cx-media { background: var(--mbg, #0c0c0c); }
.cx-palram .cx-body .cx-panel .cx-media { background: #fff; }
.cx-metroboard .cx-body .cx-panel .cx-media { background: #1a1a1a url("assets/projects/metroboard/metro-bg.jpg") center / cover; }

/* ---------- mobile: nothing is cropped — every piece shows whole, at its own proportions ---------- */
@media (max-width: 980px) {
  .cx-panel-frame .cx-media, .cx-duo .cx-media, .cx-trio .cx-media { transform: none; }
  .cx-panel-frame { clip-path: inset(calc((1 - var(--p, 1)) * 8%) 0 0 round var(--cx-r)); }
  .cx-panel--bleed-mob .cx-panel-frame, .cx-panel--full .cx-panel-frame { clip-path: inset(calc((1 - var(--p, 1)) * 8%) 0 0); }
  /* hero: the mobile cut sits whole at the top, the title on black beneath it */
  .cx-hero .cx-media, html.hv-js .cx-hero .cx-media { transform: none; animation: none; background: var(--herobg-m, #000); }
  .cx-hero .cx-media img, .cx-hero .cx-media video,
  .cx-hero .cx-media.cx-only-mob img, .cx-hero .cx-media.cx-only-mob video { object-fit: cover; object-position: var(--heropos-m, 50% 50%); }
  .cx-hero-scrim { background: linear-gradient(to top, #000 0%, #000 24%, rgba(0,0,0,0) 46%); }
  /* next project: the image whole, name underneath */
  .cx-next { height: auto; }
  .cx-next .cx-media { position: relative; inset: auto; z-index: 0; transform: none; filter: none; }
  .cx-next .cx-media img, .cx-next .cx-media video { object-fit: contain; }
  .cx-next-ui { position: static; padding: 18px 16px max(26px, env(safe-area-inset-bottom)); }
}

/* ---------- mobile gallery: a deck — each photo slides up and settles on top of the last ---------- */
@media (max-width: 980px) {
  .cx-hs-track { display: block; overflow: visible; scroll-snap-type: none; padding: 0 16px; }
  .cx-shot, .cx-shot:nth-child(even), .cx-shot:nth-child(3n) {
    display: block;
    position: sticky;
    top: calc(var(--header-h) + 18px + var(--i, 0) * 9px);
    width: 100%;
    margin: 0 0 34px;
    border-radius: 14px;
    box-shadow: 0 -14px 34px rgba(0, 0, 0, .7), 0 0 0 1px rgba(247, 244, 239, .1);
  }
  .cx-shot:last-child { margin-bottom: 0; }
  .cx-hs-bar { display: none; }
  .cx-hs-hint .d { display: none; }
}
@media (min-width: 981px) { .cx-hs-hint .m { display: none; } }

/* ---------- desktop: a panel never grows taller than the screen, so each piece is seen whole ---------- */
@media (min-width: 981px) {
  .cx-panel > .cx-panel-frame { max-width: calc((100vh - var(--header-h) - 92px) * (var(--far, 99))); margin-inline: auto; }
  .cx-panel--full > .cx-panel-frame { border-radius: 0; }
}

/* ---------- padded panels: artwork with a transparent background sits inside its coloured field, with air around it ---------- */
@media (min-width: 981px) {
  .cx-panel-frame.cx-pad { --pad: clamp(28px, 4vw, 64px); padding: var(--pad); background: var(--mbg, #0c0c0c); max-width: calc((100vh - var(--header-h) - 92px - var(--pad) * 2) * (var(--far, 99)) + var(--pad) * 2); }
  .cx-body .cx-panel .cx-panel-frame.cx-pad .cx-media { background: transparent; overflow: visible; transform: none; }
}

/* ---------- any still can be opened large ---------- */
.cx-zoomable { cursor: zoom-in; }
.cx-zoomable:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.cx-lb img { background: var(--lbbg, transparent); max-width: 96vw; max-height: 92vh; max-height: 92svh; }
/* a little more room for the artwork on desktop */
@media (min-width: 981px) {
  .cx-panel > .cx-panel-frame { max-width: calc((100vh - var(--header-h) - 64px) * (var(--far, 99))); }
  .cx-panel-frame.cx-pad { --pad: clamp(20px, 2.4vw, 40px); max-width: calc((100vh - var(--header-h) - 64px - var(--pad) * 2) * (var(--far, 99)) + var(--pad) * 2); }
}
.cx-lb { background: #050505; }

/* ==========================================================================
   Blocks added for the full portfolio: stage with drifting objects, self-
   changing slides, phone frames, big figure, four-up grid, tall boards
   ========================================================================== */
.cx-shot { aspect-ratio: var(--sar, 3 / 2); }
.cx-quad { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 1.4vw, 24px); align-items: start; }
.cx-quad > :nth-child(even) .cx-panel-frame { transform: translate3d(0, calc((1 - var(--p, 1)) * 150px), 0); }
.cx-trio { align-items: start; }
.cx-vids--one { grid-template-columns: minmax(0, 1200px); justify-content: center; }

/* ---- screens: caption per screen, phone frames ---- */
.cx-screen-fig { margin: 0; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.cx-screen-fig figcaption { align-self: stretch; padding-top: 12px; text-align: center; font-size: clamp(11px, .95vw, 13px); font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--hv-dim); }
.cx-screens--phones { grid-template-columns: repeat(3, minmax(0, 290px)); gap: clamp(20px, 4vw, 70px); }
.cx-screen--phone { position: relative; border-radius: clamp(26px, 2.6vw, 40px); border: clamp(6px, .6vw, 9px) solid #1c1c1c; background: #000; box-shadow: 0 0 0 1px rgba(247, 244, 239, .16), 0 40px 80px rgba(0, 0, 0, .6); }
.cx-screen-notch { position: absolute; z-index: 2; left: 50%; top: 9px; width: 30%; height: 16px; margin-left: -15%; border-radius: 10px; background: #000; }
.cx-screens--phones .cx-screen-fig:nth-child(2) { margin-top: clamp(30px, 7vh, 90px); }

/* ---- stage: one object in the middle, loose pieces drifting past at different depths ---- */
.cx-stage-box { position: relative; overflow: hidden; border-radius: var(--cx-r); background: var(--sbg, #111); aspect-ratio: var(--sar, 16 / 9); margin-inline: auto; max-width: calc((100vh - var(--header-h) - 64px) * var(--sarn, 1.7778)); isolation: isolate; }
.cx-stage-center { position: absolute; inset: var(--cin, 9% 14%); z-index: 2; transform: translate3d(0, calc((var(--p, .5) - .5) * 70px), 0) scale(calc(.9 + var(--p, .5) * .14)); will-change: transform; }
.cx-stage-center img { display: block; width: 100%; height: 100%; object-fit: contain; }
.cx-float { position: absolute; left: var(--x); top: var(--y); width: var(--w); height: auto; z-index: 3; pointer-events: none; transform: translate3d(0, calc((.5 - var(--p, .5)) * var(--s, 200) * 1px), 0) rotate(calc((var(--p, .5) - .5) * var(--r, 0) * 1deg)); will-change: transform; }
.cx-float.is-back { z-index: 1; filter: blur(2.5px); opacity: .92; }
.cx-stage-word { position: absolute; inset: 0; z-index: 0; display: grid; place-items: center; margin: 0; pointer-events: none; font-size: clamp(56px, 15vw, 270px); font-weight: 700; letter-spacing: -.06em; line-height: 1; white-space: nowrap; color: var(--wc, rgba(255, 255, 255, .2)); transform: translate3d(calc((.5 - var(--p, .5)) * 14vw), 0, 0); will-change: transform; }

/* ---- slides: the screens change by themselves inside one browser frame ---- */
.cx-slides { position: relative; overflow: hidden; border-radius: var(--cx-r); background: #161616; border: 1px solid rgba(247, 244, 239, .12); margin-inline: auto; max-width: calc((100vh - var(--header-h) - 150px) * var(--sarn, 1.7778)); transform: translate3d(0, calc((1 - var(--p, 1)) * 90px), 0); clip-path: inset(calc((1 - var(--p, 1)) * 12%) calc((1 - var(--p, 1)) * 6%) 0 round var(--cx-r)); will-change: transform, clip-path; }
.cx-slides-view { position: relative; aspect-ratio: var(--sar, 16 / 9); background: var(--mbg, #111); cursor: pointer; overflow: hidden; }
.cx-slides-view img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity .9s, transform 1.8s var(--hv-expo); }
.cx-slides-view img.is-on { opacity: 1; transform: none; z-index: 1; }
.cx-slides-dots { display: flex; gap: 6px; padding: 4px 14px 6px; background: #1d1d1d; }
.cx-slides-dots button { flex: 1; padding: 10px 0; border: 0; background: none; cursor: pointer; }
.cx-slides-dots i { position: relative; display: block; height: 2px; overflow: hidden; background: rgba(247, 244, 239, .2); }
.cx-slides-dots i::after { content: ""; position: absolute; inset: 0; background: var(--pink); transform: scaleX(0); transform-origin: 0 50%; }
.cx-slides-dots button.is-done i::after { transform: scaleX(1); }
.cx-slides-dots button.is-on i::after { animation: cx-fill 3.6s linear forwards; }
.cx-slides.is-paused .cx-slides-dots button.is-on i::after { animation-play-state: paused; }
.cx-slides-dots button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
@keyframes cx-fill { to { transform: scaleX(1); } }

/* ---- one big figure ---- */
.cx-stat { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(14px, 2vw, 34px); align-items: end; padding: clamp(30px, 6vh, 80px) var(--hv-g) clamp(50px, 10vh, 130px); overflow: hidden; }
.cx-stat strong { grid-column: 1 / 8; margin-left: -.05em; font-size: clamp(120px, 25vw, 460px); font-weight: 600; line-height: .8; letter-spacing: -.07em; font-variant-numeric: tabular-nums; white-space: nowrap; transform: translate3d(calc((1 - var(--p, 1)) * -7vw), 0, 0); will-change: transform; }
.cx-stat p { grid-column: 8 / -1; margin: 0 0 .5em; font-size: clamp(18px, 1.9vw, 30px); font-weight: 500; line-height: 1.3; letter-spacing: -.02em; }
.cx-stat p::before { content: ""; display: block; width: 44px; height: 2px; margin-bottom: 22px; background: var(--pink); }

/* ---- tall presentation boards: shown whole, at reading width ---- */
.cx-panel-frame.cx-tall .cx-media { transform: none; }

@media (max-width: 980px) {
  .cx-quad { grid-template-columns: 1fr 1fr; gap: 8px; }
  .cx-quad > * .cx-panel-frame { transform: translate3d(0, calc((1 - var(--p, 1)) * 50px), 0) !important; }
  .cx-quad .cx-media { transform: none; }
  .cx-panel-frame.cx-tall { max-width: none !important; }
  .cx-screens--phones { display: flex; grid-template-columns: none; gap: 14px; margin: 0 -16px; padding: 0 16px 6px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; justify-content: flex-start; }
  .cx-screens--phones::-webkit-scrollbar { display: none; }
  .cx-screens--phones .cx-screen-fig { flex: 0 0 62vw; scroll-snap-align: center; }
  .cx-screens--phones .cx-screen-fig:nth-child(2) { margin-top: 0; }
  .cx-stage-box { aspect-ratio: var(--sar-m, 4 / 5); max-width: none; border-radius: 14px; }
  .cx-stage-center { inset: var(--cin-m, 16% 6%); }
  .cx-float { width: calc(var(--w) * 1.7); transform: translate3d(0, calc((.5 - var(--p, .5)) * var(--s, 200) * .45px), 0) rotate(calc((var(--p, .5) - .5) * var(--r, 0) * 1deg)); }
  .cx-stage-word { font-size: 22vw; }
  .cx-slides { max-width: none; border-radius: 12px; transform: translate3d(0, calc((1 - var(--p, 1)) * 40px), 0); clip-path: none; }
  .cx-stat { display: block; padding: 20px 16px 50px; }
  .cx-stat strong { display: block; font-size: 44vw; }
  .cx-stat p { margin-top: 26px; font-size: 19px; }
  .cx-vids--one { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .cx-slides-dots button.is-on i::after { animation: none; transform: scaleX(1); }
}

/* a zoom that shows its film whole keeps clear of the header */
@media (min-width: 981px) { .cx-zoom[style*="--fit:contain"] .cx-zoom-card .cx-media { top: var(--header-h); } }

/* ---- banner: edge-to-edge image, chapter title and credit set on its dark top ---- */
.cx-banner { position: relative; margin: clamp(40px, 9vh, 120px) 0 clamp(26px, 6vh, 90px); overflow: hidden; }
.cx-banner .cx-media { background: #000; transform: scale(calc(1.12 - var(--p, 1) * .12)); transform-origin: 50% 70%; will-change: transform; }
.cx-banner-ui { position: absolute; inset: 0 0 auto; z-index: 2; padding: clamp(24px, 5vh, 70px) var(--hv-g) 0; }
.cx-banner-ui .hv-kicker { margin-bottom: clamp(10px, 1.8vh, 20px); }
.cx-banner-ui h2 { margin: 0; font-size: clamp(38px, 7vw, 128px); font-weight: 600; line-height: .94; letter-spacing: -.05em; }
.cx-banner-credit { display: inline-flex; align-items: center; gap: 16px; margin: clamp(14px, 2.6vh, 30px) 0 0; font-size: clamp(15px, 1.7vw, 28px); font-weight: 500; letter-spacing: -.01em; }
.cx-banner-credit::before { content: ""; flex: none; width: 44px; height: 2px; background: var(--pink); }
.cx-banner-credit b { font-weight: 700; color: var(--pink); }
.cx-banner-note { margin: 12px 0 0; max-width: 46ch; font-size: clamp(13px, 1vw, 16px); line-height: 1.55; color: var(--hv-dim); }
@media (max-width: 980px) {
  .cx-banner { display: flex; flex-direction: column; margin: 50px 0 22px; }
  .cx-banner-ui { position: static; padding: 0 16px 6px; }
  .cx-banner-ui h2 { font-size: clamp(36px, 11vw, 72px); }
  .cx-banner .cx-media { order: 2; transform: none; }
}

/* full panels run edge to edge on desktop — the image is as wide as the screen */
@media (min-width: 981px) { .cx-panel--full > .cx-panel-frame { max-width: none !important; } }

/* slides: as wide as the page allows */
@media (min-width: 981px) { .cx-slides { max-width: calc((100vh - var(--header-h) - 40px) * var(--sarn, 1.7778)); } }

/* ---- full-screen stage: the whole viewport is the scene ---- */
.cx-stage--full { padding: 0; }
.cx-stage--full .cx-stage-box { aspect-ratio: auto; height: 100vh; height: 100svh; max-width: none; border-radius: 0; }
.cx-stage--full .cx-cap { padding: 14px var(--hv-g) 0; }
.cx-stage-box::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(ellipse 46% 38% at 50% 50%, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 70%); }
.cx-stage-box::after { content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none; background: radial-gradient(ellipse 85% 75% at 50% 50%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 20, .28) 100%); }
.cx-stage-center img { filter: drop-shadow(0 34px 40px rgba(0, 20, 60, .38)); }
.cx-float { filter: drop-shadow(0 18px 18px rgba(0, 20, 60, .28)); }
.cx-float.is-back { filter: blur(3px); opacity: .85; }
.cx-float.is-front { z-index: 4; filter: blur(7px); opacity: .95; }
.cx-stage--full .cx-stage-word { font-size: clamp(70px, 19vw, 380px); color: rgba(255, 255, 255, .16); }
@media (max-width: 980px) {
  .cx-stage--full .cx-stage-box { height: auto; aspect-ratio: var(--sar-m, 4 / 5); border-radius: 0; }
  .cx-stage--full .cx-cap { padding: 10px 16px 0; }
  .cx-float.is-front { display: none; }
}

/* ---- zoom overlay: loose spheres that grow towards you as the page is held ---- */
.cx-zoom-over { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; object-fit: cover; pointer-events: none; transform-origin: 38% 48%; transform: scale(calc(.9 + var(--p, 0) * 1.9)) translate3d(0, calc(var(--p, 0) * -4%), 0); will-change: transform; }
@media (max-width: 980px) { .cx-zoom { position: relative; overflow: hidden; } .cx-zoom-over { transform: scale(calc(1 + var(--p, 0) * 1.2)); } }

/* ---- parallax window: edge to edge, the design travels through it as you scroll ---- */
.cx-par { margin: 0 0 clamp(26px, 6vh, 90px); }
.cx-par-box { position: relative; height: calc(100vh - var(--header-h)); overflow: hidden; background: #0c0c0c; }
.cx-par-img { display: block; width: 100%; height: auto; transform: translate3d(0, calc(var(--p, 0) * var(--dy, 0) * -1px), 0) scale(1.02); transform-origin: 50% 0; will-change: transform; }
.cx-par .cx-cap { padding: 14px var(--hv-g) 0; }

/* ---- split: a big figure beside artwork that runs off the right edge ---- */
.cx-split { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: clamp(20px, 4vw, 70px); padding-left: var(--hv-g); margin: clamp(30px, 8vh, 110px) 0; overflow: hidden; }
.cx-split-copy strong { display: block; margin-left: -.05em; font-size: clamp(110px, 19vw, 340px); font-weight: 600; line-height: .82; letter-spacing: -.07em; font-variant-numeric: tabular-nums; white-space: nowrap; transform: translate3d(calc((1 - var(--p, 1)) * -6vw), 0, 0); will-change: transform; }
.cx-split-copy p { margin: clamp(20px, 4vh, 40px) 0 0; max-width: 20ch; font-size: clamp(18px, 1.9vw, 30px); font-weight: 500; line-height: 1.3; letter-spacing: -.02em; }
.cx-split-copy p::before { content: ""; display: block; width: 44px; height: 2px; margin-bottom: 22px; background: var(--pink); }
.cx-split-img { height: calc(100vh - var(--header-h) - 40px); aspect-ratio: var(--ar, 1 / 1); overflow: hidden; transform: translate3d(calc((1 - var(--p, 1)) * 9vw), 0, 0); will-change: transform; }
.cx-split-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 980px) {
  .cx-split { display: block; padding: 20px 16px 30px; margin: 0; }
  .cx-split-copy strong { font-size: 40vw; }
  .cx-split-copy p { font-size: 19px; }
}

/* ---------- mobile hero: the media at its own height, the title straight under it — no empty black band ---------- */
@media (max-width: 980px) {
  /* the picture stays pinned under the header; the black title block (and the page after it) rises over it */
  .cx-hero, .cx-hero-stage { display: contents; }
  .cx-hero .cx-media, html.hv-js .cx-hero .cx-media { position: sticky; inset: auto; top: var(--header-h); z-index: 0; margin-top: var(--header-h); opacity: calc(1 - var(--p, 0) * .6); width: 100%; aspect-ratio: var(--ar-m, var(--ar-d, 16 / 9)); max-height: 68vh; max-height: 68svh; }
  .cx-hero-scrim { display: none; }
  .cx-hero-ui { position: relative; inset: auto; z-index: 2; padding-top: 22px; background: #000; transform: none; opacity: 1; }
  .cx-hero-ui::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 70px; pointer-events: none; background: linear-gradient(to top, #000, rgba(0, 0, 0, 0)); opacity: calc(var(--p, 0) * 3); }
}

/* ---- combo (mobile): laptop behind, the phone in hand in front, one scene ---- */
.cx-combo { position: relative; overflow: hidden; aspect-ratio: 4 / 5; border-radius: 14px; background: var(--cbg, #111); isolation: isolate; }
.cx-combo::before { content: ""; position: absolute; inset: 0; z-index: 0; background: radial-gradient(ellipse 70% 45% at 50% 30%, rgba(226, 35, 26, .32), rgba(226, 35, 26, 0) 70%), linear-gradient(to bottom, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .55) 100%); }
.cx-combo-back { position: absolute; z-index: 1; left: 5%; top: 9%; width: 90%; height: auto; filter: drop-shadow(0 22px 26px rgba(0, 0, 0, .6)); transform: translate3d(0, calc((1 - var(--p, 1)) * -26px), 0); will-change: transform; }
.cx-combo-front { position: absolute; z-index: 2; right: 3%; bottom: 0; width: 55%; height: auto; filter: drop-shadow(-14px 10px 26px rgba(0, 0, 0, .65)); transform: translate3d(0, calc((1 - var(--p, 1)) * 90px), 0); will-change: transform; }

/* ---- Right Cup: the fruit scene comes at the viewer — the screens zoom in as you scroll, the fruit flies past ---- */
.cx-cup .cx-stage-center { transform: translate3d(0, calc((var(--p, .5) - .5) * 40px), 0) scale(calc(.62 + var(--p, .5) * .95)); }
.cx-cup .cx-float { transform: translate3d(0, calc((.5 - var(--p, .5)) * var(--s, 200) * 1px), 0) rotate(calc((var(--p, .5) - .5) * var(--r, 0) * 1deg)) scale(calc(.7 + var(--p, .5) * .8)); }
.cx-cup .cx-float.is-back { transform: translate3d(0, calc((.5 - var(--p, .5)) * var(--s, 200) * 1px), 0) rotate(calc((var(--p, .5) - .5) * var(--r, 0) * 1deg)) scale(calc(.85 + var(--p, .5) * .35)); }
.cx-cup .cx-float.is-front { transform: translate3d(0, calc((.5 - var(--p, .5)) * var(--s, 200) * 1px), 0) rotate(calc((var(--p, .5) - .5) * var(--r, 0) * 1deg)) scale(calc(.6 + var(--p, .5) * 1.3)); }
@media (max-width: 980px) {
  .cx-cup .cx-float { transform: translate3d(0, calc((.5 - var(--p, .5)) * var(--s, 200) * .45px), 0) rotate(calc((var(--p, .5) - .5) * var(--r, 0) * 1deg)) scale(calc(.7 + var(--p, .5) * .8)); }
  .cx-cup .cx-float.is-back { transform: translate3d(0, calc((.5 - var(--p, .5)) * var(--s, 200) * .45px), 0) rotate(calc((var(--p, .5) - .5) * var(--r, 0) * 1deg)) scale(calc(.85 + var(--p, .5) * .35)); }
}
@media (prefers-reduced-motion: reduce) { .cx-cup .cx-stage-center, .cx-cup .cx-float, .cx-cup .cx-float.is-back, .cx-cup .cx-float.is-front { transform: none; } }

/* the "Case study / Scroll" line under the project title is gone */
.cx-hero-foot { display: none; }

/* phone: tighter under the title (the Case study / Scroll line is gone) */
@media (max-width: 980px) { .cx-hero-ui { padding-bottom: 4px; } .cx-intro { padding-top: 20px; } }

/* phone: keep the hero margin inside .page, so the header does not shift while the page is being moved */
@media (max-width: 980px) { body.cx-page .page { display: flow-root; } }

/* ---- Optimai on phones: the old site's running order, one continuous flow ---- */
@media (max-width: 980px) {
  .cx-optimai .cx-body { display: flex; flex-direction: column; }
  .cx-optimai .cx-body > * { order: 20; }
  .cx-optimai .cx-body > .cx-intro { order: 0; }
  .cx-optimai [data-op="logo"] { order: 1; } .cx-optimai [data-op="char"] { order: 2; }
  .cx-optimai [data-op="head"] { order: 3; } .cx-optimai [data-op="app"] { order: 4; }
  .cx-optimai [data-op="respo"] { order: 5; } .cx-optimai [data-op="phone"] { order: 6; }
  .cx-optimai [data-op="screens"] { order: 7; } .cx-optimai [data-op="imac"] { order: 8; }
  .cx-optimai [data-op="tall"] { order: 9; } .cx-optimai [data-op="build"] { order: 10; }
  .cx-optimai [data-op="end"] { order: 11; }
  .cx-optimai section.cx-only-mob { display: block !important; }
  /* no boxes, no gaps, no captions between the pieces */
  .cx-optimai .cx-body > .cx-panel { padding-top: 0; padding-bottom: 0; margin: 0; }
  .cx-optimai .cx-body > .cx-panel .cx-cap { display: none; }
  .cx-optimai .cx-body > .cx-panel .cx-panel-frame, .cx-optimai .cx-body > .cx-panel .cx-media { border-radius: 0; clip-path: none; }
  .cx-optimai [data-op="imac"] { padding-left: 0; padding-right: 0; }
  .cx-optimai [data-op="imac"] .cx-duo { gap: 0; }
  .cx-optimai [data-op="phone"] .cx-media.cx-only-mob { background: #ebebeb; }
}

/* Optimai on phones: the closing iMac + screens picture is left out */
@media (max-width: 980px) { .cx-optimai [data-op="end"] { display: none !important; } }

/* Optimai on phones: exactly the old running order after the logo — joined pieces, nothing animates on scroll */
@media (max-width: 980px) {
  .cx-optimai [data-op="char"], .cx-optimai [data-op="head"] { display: none !important; }
  .cx-optimai [data-op="imac"] .cx-duo > *:nth-child(n + 2) { display: none !important; }
  .cx-optimai .cx-body > .cx-panel:not([data-op="logo"]), .cx-optimai .cx-body > .cx-panel:not([data-op="logo"]) [data-scrub] { --p: 1 !important; }
  .cx-optimai .cx-body > .cx-panel:not([data-op="logo"]), .cx-optimai .cx-body > .cx-panel:not([data-op="logo"]) * { transform: none !important; clip-path: none !important; opacity: 1 !important; transition: none !important; animation: none !important; }
  .cx-optimai .cx-body > .cx-panel:not([data-op="logo"]) video:not(.is-ready) { opacity: 0 !important; }
}

/* ---- Palram: after the logo opening, the boards sit joined — no gaps, no captions, no frames, nothing animates on scroll (desktop and phone) ---- */
.cx-palram .cx-zoom { margin-bottom: 0; }
.cx-palram .cx-body > .cx-panel { padding: 0; margin: 0; max-width: none; --p: 1 !important; }
.cx-palram .cx-body > .cx-panel .cx-cap { display: none; }
.cx-palram .cx-body > .cx-panel [data-scrub] { --p: 1 !important; }
.cx-palram .cx-body > .cx-panel, .cx-palram .cx-body > .cx-panel * { transform: none !important; clip-path: none !important; border-radius: 0 !important; transition: none !important; animation: none !important; }
.cx-palram .cx-body > .cx-panel .cx-panel-frame { max-width: none !important; width: 100%; margin: 0; }
.cx-palram .cx-body > .cx-panel .cx-media { background: #fff; }
@media (max-width: 980px) { .cx-palram .cx-zoom { margin-bottom: 0; } .cx-palram .cx-zoom-cap { display: none; } }

/* ---------- the end of a project: a carousel of the other projects ---------- */
.cx-more { position: relative; z-index: 2; background: #000; padding: clamp(56px, 11vh, 150px) 0 clamp(46px, 8vh, 110px); overflow: hidden; }
.cx-more-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 0 var(--hv-g); margin-bottom: clamp(22px, 4.4vh, 52px); }
.cx-more-head h2 { margin: 0; font-size: clamp(44px, 8.4vw, 150px); font-weight: 600; line-height: .9; letter-spacing: -.055em; }
.cx-more-head h2 em { font-family: "Instrument Serif", serif; font-style: italic; font-weight: 400; letter-spacing: -.02em; color: var(--pink); }
.cx-more-ctrl { display: flex; align-items: center; gap: 10px; padding-bottom: .6vw; }
.cx-more-all { display: inline-flex; align-items: center; gap: 9px; margin-right: 16px; font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; white-space: nowrap; }
.cx-more-all svg { width: 11px; height: 11px; }
.cx-more-btn { display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border: 1px solid rgba(247, 244, 239, .28); border-radius: 50%; background: transparent; color: #f7f4ef; cursor: pointer; transition: background-color .35s, color .35s, border-color .35s, opacity .3s; }
.cx-more-btn svg { width: 16px; height: 16px; }
.cx-more-btn[data-dir="-1"] svg { transform: rotate(180deg); }
.cx-more-btn:disabled { opacity: .28; cursor: default; }
.cx-more-btn:focus-visible, .cx-more-card:focus-visible, .cx-more-all:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.cx-more-track { display: flex; gap: clamp(12px, 1.5vw, 26px); margin: 0; padding: 0 var(--hv-g); list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: var(--hv-g); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cx-more-track::-webkit-scrollbar { display: none; }
.cx-more-track.is-drag { scroll-snap-type: none; cursor: grabbing; }
.cx-more-track li { flex: none; width: clamp(250px, 27vw, 520px); scroll-snap-align: start; }
.cx-more-card { display: block; color: inherit; }
.cx-more-img { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 6px; background: #111; }
.cx-more-img img { position: absolute; top: 0; left: -8%; width: 116%; max-width: none; height: 100%; object-fit: cover; transform: translate3d(calc(var(--k, 0) * -6%), 0, 0) scale(1.02); transition: transform .9s var(--hv-expo); -webkit-user-drag: none; user-select: none; }
.cx-more-card b { display: block; margin-top: 14px; font-size: clamp(20px, 1.9vw, 34px); font-weight: 600; letter-spacing: -.035em; line-height: 1.05; }
.cx-more-card i { display: block; margin-top: 6px; font-style: normal; font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--hv-dim); }
.cx-more-bar { height: 2px; margin: clamp(22px, 4vh, 44px) var(--hv-g) 0; background: rgba(247, 244, 239, .14); }
.cx-more-bar span { display: block; width: 100%; height: 100%; background: var(--pink); transform-origin: 0 50%; transform: scaleX(var(--f, .1)); }
@media (hover: hover) {
  .cx-more-btn:not(:disabled):hover { background: #f7f4ef; color: #000; border-color: #f7f4ef; }
  .cx-more-track:hover .cx-more-card { opacity: .55; }
  .cx-more-track .cx-more-card { transition: opacity .4s; }
  .cx-more-track .cx-more-card:hover { opacity: 1; }
  .cx-more-card:hover .cx-more-img img { transform: translate3d(calc(var(--k, 0) * -6%), 0, 0) scale(1.08); }
}
@media (max-width: 980px) {
  .cx-more { padding: 54px 0 44px; }
  .cx-more-head { padding: 0 16px; align-items: center; margin-bottom: 20px; }
  .cx-more-head h2 { font-size: clamp(40px, 13vw, 64px); }
  .cx-more-btn { display: none; }
  .cx-more-all { margin-right: 0; font-size: 10px; }
  .cx-more-track { gap: 10px; padding: 0 16px; scroll-padding-left: 16px; }
  .cx-more-track li { width: 72vw; max-width: 340px; }
  .cx-more-card b { margin-top: 11px; font-size: 22px; }
  .cx-more-bar { margin: 22px 16px 0; }
}
@media (prefers-reduced-motion: reduce) { .cx-more-img img { transform: none !important; transition: none; } }

/* the pink scroll-progress line is gone (desktop and phone) */
.cx-progress { display: none !important; }

/* carousel covers play their clip; on phones the row runs by itself, endlessly */
.cx-more-img video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s; pointer-events: none; }
.cx-more-img video.is-ready { opacity: 1; }
@media (max-width: 980px) {
  .cx-more-track.is-auto { scroll-snap-type: none; }
  .cx-more-track.is-auto + .cx-more-bar { display: none; }
  .cx-more-track li { width: 64vw; }
}

/* ---- Arava on phones: the old site's running order after the logo — joined pieces, nothing animates on scroll ---- */
@media (max-width: 980px) {
  .cx-arava .cx-body { display: flex; flex-direction: column; }
  .cx-arava .cx-body > .cx-intro { order: 0; }
  .cx-arava .cx-body > .cx-zoom { order: 1; margin-bottom: 0; }
  .cx-arava .cx-zoom-cap, .cx-arava .cx-body .cx-cap { display: none !important; }
  .cx-arava .cx-body > .cx-panel:nth-child(3) { order: 2; }
  .cx-arava .cx-body > .cx-panel:nth-child(4) { order: 3; }
  .cx-arava .cx-body > .cx-panel:nth-child(5) { order: 4; }
  /* the two side-by-side groups open up so each piece takes its own place in the flow */
  .cx-arava .cx-body > .cx-panel:nth-child(6), .cx-arava .cx-body > .cx-panel:nth-child(7),
  .cx-arava .cx-body > .cx-panel:nth-child(6) > .cx-duo, .cx-arava .cx-body > .cx-panel:nth-child(7) > .cx-duo { display: contents; }
  .cx-arava .cx-body > .cx-panel:nth-child(6) > .cx-duo > * { display: none; }   /* the phone board above already carries the posters */
  .cx-arava .cx-body > .cx-panel:nth-child(7) > .cx-duo > :nth-child(1) { order: 6; }
  .cx-arava .cx-body > .cx-panel:nth-child(9) { order: 7; }
  .cx-arava .cx-body > .cx-panel:nth-child(8) { order: 8; }
  .cx-arava .cx-body > .cx-panel:nth-child(7) > .cx-duo > :nth-child(2) { order: 9; }
  .cx-arava .cx-body > .cx-more { order: 30; }
  .cx-arava .cx-body > .cx-panel { padding: 0; margin: 0; }
  .cx-arava .cx-body > .cx-panel, .cx-arava .cx-body > .cx-panel [data-scrub] { --p: 1 !important; }
  .cx-arava .cx-body > .cx-panel, .cx-arava .cx-body > .cx-panel * { transform: none !important; clip-path: none !important; border-radius: 0 !important; transition: none !important; animation: none !important; }
  .cx-arava .cx-body > .cx-panel video:not(.is-ready) { opacity: 0; }
  .cx-arava .cx-body > .cx-panel .cx-panel-frame { max-width: none !important; width: 100%; margin: 0; }
}

/* Arava on phones: no hairlines between the boards */
@media (max-width: 980px) {
  .cx-arava .cx-body > .cx-panel:not(:nth-child(6)):not(:nth-child(7)), .cx-arava .cx-body > .cx-panel > .cx-duo > * { margin-top: -1px !important; position: relative; }
  .cx-arava .cx-body > .cx-panel .cx-panel-frame, .cx-arava .cx-body > .cx-panel .cx-media { background: #f2f2f4 !important; }
  .cx-arava .cx-body > .cx-panel .cx-media img, .cx-arava .cx-body > .cx-panel .cx-media video { display: block; }
}

/* "Name / descriptor": the descriptor sits on its own line, lighter — no dash, no pink rule */
.hv-sub { display: block; margin-top: .22em; font-weight: 400; font-size: .86em; letter-spacing: 0; color: var(--hv-dim); text-transform: none; }
.cx-cap .hv-sub, .cx-zoom-cap .hv-sub { letter-spacing: .04em; }
/* shorter copy: the detail line reads as one calm paragraph */
.cx-detail { max-width: 46ch; }

/* phone: the big number sits beside its line, at a calmer size */
@media (max-width: 980px) {
  .cx-stat { display: flex; align-items: flex-end; gap: 16px; padding: 6px 16px 34px; }
  .cx-stat strong { font-size: 25vw; flex: none; }
  .cx-stat p { margin: 0 0 .35em; font-size: 16px; line-height: 1.3; }
  .cx-stat p::before { width: 28px; margin-bottom: 10px; }
}

/* ---- Polyram on phones: like the old page — the boards run full width, joined, nothing animates on scroll ---- */
@media (max-width: 980px) {
  .cx-polyram .cx-body > .cx-panel { padding: 0 !important; margin: -1px 0 0 !important; max-width: none; position: relative; }
  .cx-polyram .cx-body > .cx-panel .cx-cap, .cx-polyram .cx-zoom-cap { display: none !important; }
  .cx-polyram .cx-body > .cx-panel, .cx-polyram .cx-body > .cx-panel [data-scrub] { --p: 1 !important; }
  .cx-polyram .cx-body > .cx-panel:not(:has(.cx-yt)), .cx-polyram .cx-body > .cx-panel:not(:has(.cx-yt)) * { transform: none !important; clip-path: none !important; border-radius: 0 !important; transition: none !important; animation: none !important; }
  .cx-polyram .cx-body > .cx-panel video:not(.is-ready) { opacity: 0; }
  .cx-polyram .cx-body > .cx-panel .cx-panel-frame { max-width: none !important; width: 100%; margin: 0; }
  .cx-polyram .cx-body > .cx-panel .cx-duo, .cx-polyram .cx-body > .cx-panel .cx-trio, .cx-polyram .cx-body > .cx-panel .cx-quad { gap: 0 !important; }
  .cx-polyram .cx-body > .cx-panel .cx-media img, .cx-polyram .cx-body > .cx-panel .cx-media video { display: block; }
  .cx-polyram .cx-body > .cx-panel:has(.cx-yt) { padding: 26px 16px !important; }
  .cx-polyram .cx-zoom { margin-bottom: 0; }
}

/* project hero: "All works" on its own, as a small pill — no category, no pink rule */
.cx-hero-meta > span { display: none !important; }
.cx-hero-meta a { padding: 9px 16px 9px 13px; border: 1px solid rgba(247, 244, 239, .32); border-radius: 999px; font-size: 10.5px; letter-spacing: .18em; background: rgba(0, 0, 0, .18); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: background-color .35s, color .35s, border-color .35s; }
.cx-hero-meta a svg { width: 11px; height: 11px; transition: transform .45s var(--hv-expo); }
@media (hover: hover) { .cx-hero-meta a:hover { background: #f7f4ef; color: #000; border-color: #f7f4ef; } .cx-hero-meta a:hover svg { transform: rotate(-135deg) translate(-2px, 0); } }
/* scroll hint, bottom right of the hero: the word "Scroll" in small caps beside a fine arrow that eases down and back */
.cx-hero::after, .cx-hero-ui::after {
  content: "Scroll"; position: absolute; z-index: 4; display: block; padding-right: 22px; pointer-events: none;
  font-size: 10.5px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; line-height: 18px; color: rgba(247, 244, 239, .72);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 18' fill='none' stroke='%23f7f4ef' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 1v15M1.5 11.5 6 16l4.5-4.5'/%3E%3C/svg%3E") no-repeat 100% 0 / 12px 18px;
  animation: cx-scrollhint 2.6s cubic-bezier(.65, 0, .35, 1) infinite; transition: opacity .4s;
}
.cx-hero::after { right: var(--hv-g); bottom: clamp(30px, 5vh, 56px); }
.cx-hero-ui::after { display: none; }
@keyframes cx-scrollhint { 0%, 100% { background-position: 100% 0; } 45% { background-position: 100% 6px; } 60% { background-position: 100% 6px; } }
html.hv-scrolled .cx-hero::after, html.hv-scrolled .cx-hero-ui::after { opacity: 0; }
@media (max-width: 980px) {
  .cx-hero::after { display: none; }
  .cx-hero-ui::after { display: block; right: 16px; top: 30px; bottom: auto; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { .cx-hero::after, .cx-hero-ui::after { animation: none; } }

/* phi-tech chapters */
.pt-index { display: flex; flex-wrap: wrap; gap: 8px 10px; padding: 0 var(--hv-g) clamp(30px, 6vh, 70px); }
.pt-index a { display: inline-flex; align-items: baseline; gap: 8px; padding: 9px 15px; border: 1px solid rgba(247,244,239,.16); border-radius: 999px; font-size: 13px; font-weight: 500; color: rgba(247,244,239,.78); text-decoration: none; transition: border-color .4s, color .4s, background-color .4s; }
.pt-index a b { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; color: rgba(247,244,239,.42); }
.pt-index a:hover { border-color: rgba(247,244,239,.6); color: #f7f4ef; background: rgba(247,244,239,.05); }
.cx-head.pt-chap { scroll-margin-top: 40px; }
.cx-head.pt-chap .hv-kicker { display: flex; align-items: center; gap: 14px; }
.cx-head.pt-chap .hv-kicker b { font-weight: 600; color: #f7f4ef; }
.cx-head.pt-chap .hv-kicker::after { content: ""; flex: 1; height: 1px; background: rgba(247,244,239,.16); }
.cx-head.pt-chap h2 { font-size: clamp(36px, 5.4vw, 96px); }
@media (max-width: 980px) {
  .pt-index { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 0 16px 34px; -webkit-overflow-scrolling: touch; }
  .pt-index::-webkit-scrollbar { display: none; }
  .pt-index a { flex: none; padding: 8px 13px; font-size: 12.5px; }
  .cx-head.pt-chap { padding-top: 54px; }
  .cx-head.pt-chap h2 { font-size: clamp(32px, 9.4vw, 56px); }
}

/* phi-tech horizontal */
.cx-head.pt-chap .hv-kicker b { display: none; }
.pt-h { position: relative; height: calc(var(--n, 6) * 62vh); margin: clamp(10px, 4vh, 50px) 0; }
.pt-h-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: clamp(16px, 3vh, 30px); }
.pt-h-title { display: flex; justify-content: space-between; margin: 0; padding: 0 var(--hv-g); font-size: clamp(11px, .95vw, 13px); font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--hv-dim); }
.pt-h-title span { color: rgba(247,244,239,.4); }
.pt-h-track { display: flex; align-items: flex-end; gap: clamp(16px, 2.2vw, 40px); width: max-content; padding: 0 var(--hv-g); transform: translate3d(calc(var(--p, 0) * (100vw - 100%)), 0, 0); will-change: transform; }
.pt-h-item { flex: none; margin: 0; }
.pt-h-item picture, .pt-h-item img { display: block; }
.pt-h-item img { height: min(64vh, 46vw); width: auto; aspect-ratio: var(--r); border-radius: var(--cx-r); background: #0c0c0c; object-fit: cover; }
.pt-h-item figcaption { padding-top: 12px; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--hv-dim); }
@media (max-width: 980px) {
  .pt-h { height: auto; margin: 0 0 22px; }
  .pt-h-pin { position: static; height: auto; overflow: visible; display: block; }
  .pt-h-title { padding: 0 16px 12px; }
  .pt-h-track { transform: none !important; width: auto; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 0 16px; gap: 10px; -webkit-overflow-scrolling: touch; }
  .pt-h-track::-webkit-scrollbar { display: none; }
  .pt-h-item { scroll-snap-align: center; }
  .pt-h-item img { height: 62vw; border-radius: 12px; }
}

/* phi-tech calm */
@media (min-width: 981px) {
  .cx-phi-tech .cx-body > .cx-panel, .cx-phi-tech .cx-body > .cx-head, .cx-phi-tech .pt-h-title { box-sizing: content-box; max-width: 1180px; margin-left: auto; margin-right: auto; padding-left: var(--hv-g); padding-right: var(--hv-g); }
  .cx-phi-tech .cx-body > .cx-panel { margin-bottom: clamp(40px, 9vh, 110px); }
  .cx-phi-tech .cx-panel--full .cx-panel-frame { border-radius: var(--cx-r); clip-path: inset(calc((1 - var(--p, 1)) * 14%) calc((1 - var(--p, 1)) * 7%) 0 round var(--cx-r)); }
  .cx-phi-tech .cx-panel--full .cx-cap { padding: 14px 0 0; }
  .cx-phi-tech .cx-body > .cx-panel.pt-narrow { max-width: 900px; }
  .cx-phi-tech .pt-first { margin-top: clamp(30px, 8vh, 90px); }
  .cx-phi-tech .cx-head.pt-chap { padding-top: clamp(70px, 14vh, 160px); }
  .cx-phi-tech .cx-head.pt-chap h2 { font-size: clamp(32px, 3.6vw, 60px); line-height: 1; }
  .cx-phi-tech .pt-h-item img { height: min(50vh, 34vw); }
  .cx-phi-tech .pt-h-track { padding-left: max(var(--hv-g), calc((100vw - 1180px) / 2)); padding-right: max(var(--hv-g), calc((100vw - 1180px) / 2)); }
}

/* phi-tech pair */
.pt-pair .cx-duo { align-items: start; }
.pt-pair .cx-media { background: #fff; }
@media (min-width: 981px) { .cx-phi-tech .cx-body > .cx-head.pt-chap:first-of-type { padding-top: clamp(40px, 9vh, 110px); } }

/* phi-tech v4: larger, still framed */
@media (min-width: 981px) {
  .cx-phi-tech .cx-body > .cx-panel, .cx-phi-tech .cx-body > .cx-head, .cx-phi-tech .pt-h-title { max-width: 1640px; }
  .cx-phi-tech .cx-body > .cx-panel.pt-narrow { max-width: 1640px; }
  .cx-phi-tech .pt-h-item img { height: min(72vh, 50vw); }
  .cx-phi-tech .pt-h-track { padding-left: max(var(--hv-g), calc((100vw - 1640px) / 2)); padding-right: max(var(--hv-g), calc((100vw - 1640px) / 2)); }
  .cx-phi-tech .cx-head.pt-chap h2 { font-size: clamp(36px, 4.4vw, 76px); }
}

/* phi-tech fade */
.pt-fade .cx-media picture { position: absolute; inset: 0; opacity: 0; animation: pt-fade 15s cubic-bezier(.45,0,.25,1) infinite; }
.pt-fade .cx-media picture:nth-child(1) { animation-delay: -1.2s; }
.pt-fade .cx-media picture:nth-child(2) { animation-delay: 3.8s; }
.pt-fade .cx-media picture:nth-child(3) { animation-delay: 8.8s; }
.pt-fade .cx-media img { transform-origin: 50% 55%; animation: pt-drift 15s linear infinite; animation-delay: inherit; }
@keyframes pt-fade { 0% { opacity: 0; } 8% { opacity: 1; } 33.3% { opacity: 1; } 41.3% { opacity: 0; } 100% { opacity: 0; } }
@keyframes pt-drift { 0% { transform: scale(1.06); } 41.3% { transform: scale(1); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .pt-fade .cx-media picture { animation: none; } .pt-fade .cx-media picture:nth-child(1) { opacity: 1; } .pt-fade .cx-media img { animation: none; } }

/* phi-tech v5 */
.pt-sq .cx-media > img { filter: blur(38px) brightness(.55) saturate(1.2); transform: scale(1.25); }
.pt-sq .cx-media video { object-fit: contain; }

/* scroll arrow fix: the arrow travels inside its own box, never clipped */
.cx-hero::after, .cx-hero-ui::after { line-height: 26px; padding-right: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 16' fill='none' stroke='%23f7f4ef' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 1v13.5M2 10.5 6 14.5l4-4'/%3E%3C/svg%3E") no-repeat 100% 2px / 10px 14px;
  animation: cx-scrollhint2 2.4s cubic-bezier(.65, 0, .35, 1) infinite; }
@keyframes cx-scrollhint2 { 0%, 100% { background-position: 100% 2px; } 50% { background-position: 100% 10px; } }

/* phi-tech v6 */
.pt-words .pw { display: inline-block; opacity: calc(.12 + var(--wp, 0) * .88); transform: translate3d(0, calc((1 - var(--wp, 0)) * .35em), 0); }
.pt-grow .cx-media img { transform: scale(calc(.86 + var(--p, .5) * .3)); transform-origin: 50% 50%; }
/* horizontal stationery: pinned on mobile too */
@media (max-width: 980px) {
  .pt-h { height: calc(var(--n, 4) * 75vh); margin: 0; }
  .pt-h-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
  .pt-h-track { transform: translate3d(calc(var(--p, 0) * (100vw - 100%)), 0, 0) !important; width: max-content; overflow: visible; scroll-snap-type: none; padding: 0 16px; gap: 12px; }
  .pt-h-item img { height: 38vh; height: 38svh; }
}
/* packaging: warehouse with the turning box set into it */
.pt-pack { position: relative; }
.pt-pack-main .cx-media { border-radius: var(--cx-r); }
.pt-pack-box { position: absolute; right: 4%; bottom: 12%; width: 30%; border-radius: calc(var(--cx-r) * .8); overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.55); transform: translate3d(0, calc((.5 - var(--p, .5)) * 140px), 0); }
.cx-phi-tech .cx-body > .pt-pack { padding-bottom: 0; }
@media (max-width: 980px) {
  .pt-pack-main .cx-media { border-radius: 0; }
  .pt-pack-box { width: 44%; right: 16px; bottom: -14%; border-radius: 12px; transform: translate3d(0, calc((.5 - var(--p, .5)) * 60px), 0); }
  .pt-pack { margin-bottom: 90px; }
  .pt-pack .cx-cap { padding-right: 50%; }
}
/* booth: pinned wipe from one view to the other */
.pt-wipe { position: relative; height: 240vh; }
.pt-wipe-pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 0 var(--hv-g); }
.pt-wipe-frame { position: relative; width: 100%; max-width: 1640px; margin: 0 auto; aspect-ratio: 1678 / 937; border-radius: var(--cx-r); overflow: hidden; background: #0c0c0c; --q: clamp(0, calc((var(--p, 0) - .22) / .56), 1); }
.pt-wipe-a, .pt-wipe-b { position: absolute; inset: 0; }
.pt-wipe-a img, .pt-wipe-b img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pt-wipe-a img { transform: scale(calc(1.06 - var(--q) * .06)); }
.pt-wipe-b { clip-path: inset(0 0 0 calc((1 - var(--q)) * 100%)); }
.pt-wipe-b img { transform: scale(calc(1.08 - var(--q) * .08)); }
.pt-wipe-line { position: absolute; top: 0; bottom: 0; left: calc((1 - var(--q)) * 100%); width: 2px; margin-left: -1px; background: rgba(255,255,255,.85); box-shadow: 0 0 24px rgba(255,255,255,.6); opacity: calc(min(var(--q), 1 - var(--q)) * 8); }
.pt-wipe .cx-cap { max-width: 1640px; margin: 0 auto; width: 100%; }
@media (max-width: 980px) {
  .pt-wipe { height: 200vh; }
  .pt-wipe-pin { padding: 0; }
  .pt-wipe-frame { border-radius: 0; aspect-ratio: 5 / 4; }
  .pt-wipe-a img, .pt-wipe-b img { object-position: 50% 50%; }
  .pt-wipe .cx-cap { padding: 10px 16px 0; }
}

/* phi-tech v7: digital cards stack as you scroll */
.pt-h-title { display: none; }
.pt-stack { position: relative; padding-bottom: 6vh; }
.pt-stack > .cx-panel { position: sticky; top: calc(var(--header-h, 72px) + 18px); margin-bottom: 18vh !important; }
.pt-stack > .cx-panel .cx-panel-frame { box-shadow: 0 -30px 80px rgba(0,0,0,.6); }
.pt-stack > .cx-panel:last-child { margin-bottom: 0 !important; }
@media (min-width: 981px) { .cx-phi-tech .pt-stack > .cx-panel { box-sizing: content-box; margin-left: auto; margin-right: auto; padding: 0 var(--hv-g); max-width: min(1640px, calc((100vh - 170px) * 16 / 9)); } .cx-phi-tech .pt-stack > .cx-panel .cx-cap { padding: 14px 0 0; } .cx-phi-tech .pt-stack > .cx-panel .cx-panel-frame { border-radius: var(--cx-r); } }
@media (max-width: 980px) { .pt-stack > .cx-panel { top: 76px; margin-bottom: 14vh !important; } }
/* phi-tech: frames reveal by clipping only, so they never slide over their captions */
.cx-phi-tech .cx-panel-frame { transform: none !important; }
.cx-phi-tech .pt-words .pw { opacity: calc(.3 + var(--wp, 0) * .7); }

/* phi-tech small square: the announcement post at post size */
.pt-sq .cx-panel-frame, .pt-sq .cx-cap { width: min(520px, 72vw); margin-left: auto; margin-right: auto; }
.pt-sq .cx-media { aspect-ratio: 1 / 1 !important; }
.pt-sq .cx-media > img { filter: none; transform: none; }
.pt-sq .cx-media video { object-fit: cover; }
.pt-stack > .pt-sq { top: calc(50vh - 260px); }
@media (max-width: 980px) { .pt-sq .cx-panel-frame { border-radius: 12px; } .pt-sq .cx-cap { padding: 10px 0 0 !important; } .pt-stack > .pt-sq { top: 120px; } }

/* phi-tech grow fix: the logo card stays put and aligned; only the logo inside grows */
.pt-grow .cx-panel-frame { transform: none !important; clip-path: none !important; }
.pt-pair .cx-duo > :nth-child(2) .cx-panel-frame { transform: none !important; clip-path: none !important; }
.pt-grow .cx-media img { transform: scale(calc(.9 + var(--p, .5) * .22)); }

/* phi-tech gap fix: the idea follows the intro closely */
.cx-phi-tech .cx-intro + .cx-head.pt-chap { padding-top: 10px !important; }
@media (min-width: 981px) { .cx-phi-tech .cx-intro + .cx-head.pt-chap { padding-top: 30px !important; } }
.pt-grow .cx-media img { transform: scale(calc(1 + var(--p, .5) * .16)); }
/* phi-tech spacing pass */
.pt-stack > .cx-panel { background: #000; padding-bottom: 16px; }
@media (min-width: 981px) { .cx-phi-tech .cx-head.pt-chap { padding-top: clamp(50px, 9vh, 110px); } }
@media (max-width: 980px) {
  .cx-phi-tech .cx-head.pt-chap { padding-top: 44px; padding-bottom: 18px; }
  .pt-h { height: calc(var(--n, 4) * 62vh); }
  .pt-h-pin { justify-content: flex-start; padding-top: 96px; }
  .pt-h-item img { height: 52vh; height: 52svh; }
  .pt-wipe { height: 170vh; }
  .pt-wipe-pin { justify-content: flex-start; padding-top: 96px; }
  .pt-wipe-frame { aspect-ratio: 4 / 5; }
  .pt-pack { margin-bottom: 70px; }
}
@media (max-width: 980px) {
  .pt-h-pin, .pt-wipe-pin { height: auto !important; top: 84px; padding-top: 12px !important; padding-bottom: 12px; }
  .pt-h { height: calc(var(--n, 4) * 52vh); }
  .pt-wipe { height: 140vh; }
}
/* phi-tech: the animated post, uncut; edge to edge on mobile */
.pt-sq .cx-panel-frame { clip-path: none !important; }
@media (max-width: 980px) {
  .pt-sq .cx-panel-frame, .pt-sq .cx-cap { width: 100%; }
  .pt-sq .cx-panel-frame { border-radius: 0; }
  .pt-sq .cx-cap { padding: 10px 16px 0 !important; }
  .pt-stack > .pt-sq { position: relative; top: auto; }
}
/* phi-tech: graphic language in the same layered layout as packaging */
.pt-pack--gl .pt-pack-box { width: 29%; right: 3%; bottom: -16%; background: #fff; }
@media (min-width: 981px) { .pt-pack--gl { margin-bottom: clamp(120px, 16vh, 190px) !important; } }
@media (max-width: 980px) { .pt-pack--gl .pt-pack-box { width: 46%; bottom: -22%; } .pt-pack--gl { margin-bottom: 110px; } }
@media (max-width: 980px) { .pt-wipe-frame { aspect-ratio: 1 / 1 !important; } }
/* phi-tech: the animated post closes the page, centred and still */
.cx-phi-tech .cx-body > .pt-sq { position: relative; top: auto; margin: clamp(30px, 8vh, 100px) auto clamp(40px, 10vh, 120px); }
/* phi-tech: mobile stationery scroll fills the screen, no empty band under it */
@media (max-width: 980px) {
  .pt-h-pin { height: calc(100svh - 84px) !important; top: 84px; padding: 0 !important; justify-content: center !important; }
  .pt-h-item img { height: 60svh; max-height: calc(100svh - 170px); }
}
/* phi-tech: mobile pins become scroll-through, so no empty band below while they play */
@media (max-width: 980px) {
  .pt-h, .pt-wipe { height: auto !important; margin-bottom: 22px; }
  .pt-h-pin, .pt-wipe-pin { position: relative !important; top: auto !important; height: auto !important; padding: 0 !important; }
}
/* phi-tech: on mobile the booth switches only once it is fully on screen */
@media (max-width: 980px) { .pt-wipe-frame { --q: clamp(0, calc((var(--p, 0) - .64) / .34), 1); } }
/* phi-tech: mobile booth pins under the header first, then the scroll switches the wall */
@media (max-width: 980px) {
  .pt-wipe { height: calc(100vw + 30px + 105vh) !important; }
  .pt-wipe-pin { position: sticky !important; top: 84px !important; height: auto !important; }
  .pt-wipe-frame { --q: clamp(0, calc((var(--p, 0) - .08) / .8), 1) !important; }
}
/* phi-tech: mobile stationery pins under the header, then slides sideways all the way to the last piece */
@media (max-width: 980px) {
  .pt-h { height: calc(48svh + 60px + var(--n, 4) * 60vh) !important; margin-bottom: 0 !important; }
  .pt-h-pin { position: sticky !important; top: 96px !important; height: auto !important; padding: 0 !important; justify-content: flex-start !important; }
  .pt-h-item img { height: 46svh !important; max-height: none !important; }
}
/* phi-tech: mobile pinned pieces sit in the middle of the screen */
@media (max-width: 980px) {
  .pt-h-pin { top: max(90px, calc(27svh - 10px)) !important; }
  .pt-wipe-pin { top: max(84px, calc(50svh - 50vw - 10px)) !important; }
}
