/* ============================================================
   UCX — homepage case-study showcase (replaces the old work-reel video + card row)
   Markup generated by deploy/build_work.py (home step). JS: assets/home-cx.js
   ============================================================ */
.ucx { --c: #CC1C6C; --ci: #fff; --dur: 6.5s; position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; isolation: isolate; background: #0c0a1c; color: #F5F4FA; }
.ucx a { color: inherit; }

/* stage: stacked mockups, slow push-in, pointer parallax on the wrapper */
.ucx__stage { position: absolute; inset: -24px; z-index: -3; transform: translate3d(var(--px, 0px), var(--py, 0px), 0); transition: transform .6s var(--ease-out, ease-out); }
.ucx__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 68% center; opacity: 0; transform: scale(1.07); transition: opacity 1s var(--ease, ease), transform 9s linear; }
.ucx__img.is-on { opacity: 1; transform: scale(1); }
.ucx__shade { position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: linear-gradient(to top, rgba(12,10,28,.96) 6%, rgba(12,10,28,.55) 34%, transparent 62%),
              linear-gradient(90deg, rgba(12,10,28,.9) 0%, rgba(12,10,28,.45) 38%, transparent 60%); }

.ucx__in { width: 100%; max-width: 1500px; margin: 0 auto; padding: clamp(96px, 14vh, 150px) clamp(16px, 4vw, 48px) 0; flex: 1; display: flex; flex-direction: column; }
.ucx__k { font-family: var(--mono); font-size: .76rem; letter-spacing: .22em; text-transform: uppercase; color: var(--c); transition: color .6s; }
.ucx__head h2 { color: #fff; font-size: clamp(2.4rem, 5vw, 4.4rem); margin: .3em 0 0; }
.ucx__head .u-serif { color: var(--c); transition: color .6s; }

.ucx__info { display: grid; margin-top: auto; padding-top: 28px; max-width: 760px; }
.ucx__panel { grid-area: 1 / 1; align-self: end; opacity: 0; visibility: hidden; transform: translateY(18px); transition: opacity .5s var(--ease, ease), transform .6s var(--ease-out, ease-out), visibility 0s .6s; }
.ucx__panel.is-on { opacity: 1; visibility: visible; transform: none; transition-delay: .12s, .12s, 0s; }
.ucx__cat { font-family: var(--mono); font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: rgba(245,244,250,.72); }
.ucx__name { font-family: var(--display); font-weight: 400; text-transform: uppercase; color: #fff; font-size: clamp(2.6rem, 5.6vw, 5.4rem); line-height: .88; margin: .14em 0 .2em; max-width: 13ch; }
.ucx__line { font-family: var(--serif); font-style: italic; font-size: clamp(1.1rem, 1.7vw, 1.45rem); line-height: 1.3; margin: 0 0 1.1rem; color: #F5F4FA; max-width: 30em; }
.ucx__row { display: flex; align-items: center; gap: 22px 28px; flex-wrap: wrap; }
.ucx__stat strong { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(2.2rem, 3.4vw, 3rem); line-height: .9; color: var(--c); }
.ucx__stat span { display: block; font-size: .86rem; color: rgba(245,244,250,.75); max-width: 18em; line-height: 1.35; margin-top: 4px; }
.ucx__go { display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border-radius: 999px; background: var(--c); color: var(--ci) !important; font-weight: 800; text-decoration: none; transition: transform .2s, box-shadow .2s, background .6s; }
.ucx__go::after { content: "→"; transition: transform .2s; }
.ucx__go:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -14px var(--c); }
.ucx__go:hover::after { transform: translateX(4px); }
.ucx__all { align-self: flex-start; margin: 18px 0 0; font-weight: 700; font-size: .95rem; text-decoration: underline; text-underline-offset: 5px; text-decoration-color: rgba(255,255,255,.35); }
.ucx__all:hover { text-decoration-color: var(--c); }

/* rail: 9 thumbs with an autoplay progress line */
.ucx__rail { width: 100%; max-width: 1500px; margin: 26px auto 0; padding: 0 clamp(16px, 4vw, 48px) clamp(22px, 4vh, 40px); display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 12px; }
.ucx__chip { position: relative; display: block; padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; opacity: .55; transition: opacity .3s; font: inherit; }
.ucx__chip:hover, .ucx__chip:focus-visible, .ucx__chip.is-on { opacity: 1; }
.ucx__chip:focus-visible { outline: 2px solid var(--c); outline-offset: 4px; border-radius: 8px; }
.ucx__thumb { display: block; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: #1a1636; box-shadow: 0 0 0 1px rgba(255,255,255,.1); transition: box-shadow .3s, transform .3s; }
.ucx__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: 60% center; display: block; }
.ucx__chip.is-on .ucx__thumb { box-shadow: 0 0 0 2px var(--chip, var(--c)); transform: translateY(-4px); }
.ucx__lbl { display: flex; gap: 6px; margin-top: 8px; font-size: .78rem; font-weight: 700; line-height: 1.25; }
.ucx__lbl b { font-family: var(--mono); font-weight: 500; color: rgba(245,244,250,.6); }
.ucx__bar { position: absolute; left: 0; right: 0; top: -10px; height: 2px; background: rgba(255,255,255,.14); border-radius: 2px; overflow: hidden; }
.ucx__bar i { display: block; height: 100%; width: 100%; background: var(--chip, var(--c)); transform: scaleX(0); transform-origin: left; }
.ucx__chip.is-on .ucx__bar i { animation: ucxBar var(--dur) linear forwards; }
.ucx.is-paused .ucx__chip.is-on .ucx__bar i, .ucx.no-auto .ucx__chip.is-on .ucx__bar i { animation-play-state: paused; }
.ucx.no-auto .ucx__chip.is-on .ucx__bar i { animation: none; transform: scaleX(1); }
@keyframes ucxBar { to { transform: scaleX(1); } }
.ucx__hint { position: absolute; right: clamp(16px, 4vw, 48px); top: clamp(96px, 14vh, 150px); font-family: var(--mono); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: rgba(245,244,250,.6); }

@media (max-width: 1100px) {
  .ucx__rail { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .ucx__rail::-webkit-scrollbar { display: none; }
  .ucx__chip { flex: 0 0 132px; scroll-snap-align: start; }
}
@media (max-width: 760px) {
  .ucx { min-height: 0; display: block; }
  .ucx__stage { position: relative; inset: auto; aspect-ratio: 16 / 10; margin-top: 64px; transform: none !important; }
  .ucx__img { object-position: 72% center; }
  .ucx__shade { inset: 64px 0 auto 0; aspect-ratio: 16 / 10; background: linear-gradient(to top, #0c0a1c 3%, transparent 45%); }
  .ucx__in { padding-top: 0; }
  .ucx__head { position: absolute; top: 80px; left: 16px; right: 16px; }
  .ucx__head h2 { font-size: 2.2rem; text-shadow: 0 2px 18px rgba(0,0,0,.6); }
  .ucx__info { margin-top: 0; padding-top: 6px; }
  .ucx__panel { align-self: start; }
  .ucx__hint { display: none; }
  .ucx__chip { flex-basis: 112px; }
}
@media (prefers-reduced-motion: reduce) {
  .ucx__img, .ucx__panel, .ucx__stage { transition: opacity .2s !important; transform: none !important; }
}

/* ---------- 2026-10-16: always exactly one screen tall (Adam) ---------- */
@media (min-width: 761px) {
  .ucx { height: 100svh; min-height: 560px; }
  .ucx__in { padding-top: clamp(84px, 11vh, 140px); min-height: 0; }
  .ucx__head h2 { font-size: clamp(1.9rem, min(4.6vw, 6.4vh), 4.2rem); }
  .ucx__info { padding-top: clamp(8px, 2vh, 24px); }
  .ucx__name { font-size: clamp(2.2rem, min(5.4vw, 8.4vh), 5.4rem); }
  .ucx__line { font-size: clamp(1rem, min(1.6vw, 2.4vh), 1.4rem); margin-bottom: clamp(8px, 1.6vh, 18px); }
  .ucx__stat strong { font-size: clamp(1.8rem, min(3.2vw, 4.6vh), 3rem); }
  .ucx__go { padding: clamp(10px, 1.6vh, 14px) clamp(18px, 2vw, 24px); }
  .ucx__all { margin-top: clamp(8px, 1.6vh, 18px); }
  .ucx__rail { margin-top: clamp(12px, 2.4vh, 26px); padding-bottom: clamp(14px, 3vh, 36px); }
  .ucx__thumb { aspect-ratio: auto; height: clamp(44px, 9.5vh, 104px); }
  .ucx__lbl { margin-top: 6px; font-size: clamp(.7rem, 1.3vh, .78rem); }
}
@media (min-width: 761px) and (max-height: 760px) { .ucx__line { display: none; } .ucx__hint { display: none; } }
@media (max-width: 760px) {
  .ucx__stage { aspect-ratio: 16 / 9; }
  .ucx__shade { aspect-ratio: 16 / 9; }
  .ucx__head { top: 74px; }
  .ucx__head h2 { font-size: 1.8rem; }
  .ucx__name { font-size: clamp(2rem, 10vw, 2.8rem); }
  .ucx__line { font-size: 1rem; margin-bottom: 10px; }
  .ucx__stat strong { font-size: 1.8rem; }
  .ucx__row { gap: 12px 18px; }
  .ucx__go { padding: 11px 18px; font-size: .92rem; }
  .ucx__all { margin-top: 10px; }
  .ucx__rail { margin-top: 14px; padding-bottom: 16px; }
  .ucx__chip { flex-basis: 96px; }
}
@media (max-width: 760px) and (max-height: 900px) { .ucx__line { display: none; } }
@media (max-width: 760px) and (max-height: 700px) { .ucx__stage, .ucx__shade { aspect-ratio: 2.3 / 1; } .ucx__all { display: none; } .ucx__name { font-size: 2rem; } .ucx__thumb { height: 56px; aspect-ratio: auto; } }
@media (max-width: 760px) and (max-height: 700px) { .ucx__chip { flex-basis: 84px; } .ucx__lbl { font-size: .7rem; margin-top: 4px; } .ucx__rail { margin-top: 10px; padding-bottom: 12px; } .ucx__info { padding-top: 2px; } }
/* keep the phone in frame: anchor right, zoom from the right edge, no overhang on the right (Adam 2026-10-16) */
@media (min-width: 761px) {
  .ucx__stage { inset: -18px 0; }
  .ucx__img { object-position: 100% 50%; transform-origin: 100% 50%; }
}
