/* Animated homepage previews. All sizes are in cqw so a preview scales with its card. */

.pv { position: absolute; inset: 0; color: var(--ink); text-transform: none; letter-spacing: 0; }
.pv-body { position: absolute; inset: 0; padding: 6cqw; }

/* ---------- 02 · Magic Insights ---------- */
.pv-magic-insights {
  --c0: #6f8bf0; --c1: #b69cf2; --c2: #f2b36b; --c3: #4fbf8f;   /* email, social, search, display */
  --step: 15.4cqw;
  --e: cubic-bezier(.65, 0, .15, 1);
  --out: cubic-bezier(.16, 1, .3, 1);
}
.pv-magic-insights .pv-top { display: flex; align-items: center; gap: 1.8cqw; font: 300 3.7cqw/1 var(--mono); text-transform: uppercase; letter-spacing: .02em; opacity: 0; transform: translateY(1.2cqw); transition: opacity .7s ease, transform .9s var(--out); }
.pv-magic-insights.live .pv-top { opacity: 1; transform: none; }
.pv-magic-insights .spark svg { display: block; width: 5.8cqw; height: 5.8cqw; fill: none; stroke: var(--ink); stroke-width: 1.3; stroke-linejoin: round; }

.pv-magic-insights .pv-q { display: flex; align-items: center; margin-top: 4.2cqw; height: 6.4cqw; font: 300 4.8cqw/1 var(--mono); text-transform: uppercase; letter-spacing: .02em; white-space: pre; }
.pv-magic-insights .pv-caret { width: .45cqw; height: 5.6cqw; margin-left: .8cqw; background: var(--ink); opacity: 0; animation: mi-blink 1s steps(1) infinite; }
.pv-magic-insights.live .pv-caret { opacity: 1; }
.pv-magic-insights .pv-q.typing .pv-caret { animation: none; opacity: 1; }

.pv-magic-insights .rows { border-bottom: 0; position: absolute; left: 6cqw; right: 6cqw; top: 33cqw; height: 62cqw; }
.pv-magic-insights .row { position: absolute; left: 0; right: 0; top: calc(var(--slot, 0) * var(--step)); height: 13.4cqw; transition: top 1s var(--e); }
.pv-magic-insights .tk { position: relative; height: 100%; width: calc(var(--w, .6) * 100%); transition: width 1s var(--e); }
.pv-magic-insights .fill { position: absolute; inset: 0; background: var(--bg); transform: scaleX(0); transform-origin: 0 50%; transition: transform 1s var(--out); }
.pv-magic-insights .row.on .fill { transform: none; }
.pv-magic-insights .c0 { --bg: var(--c0); } .pv-magic-insights .c1 { --bg: var(--c1); }
.pv-magic-insights .c2 { --bg: var(--c2); } .pv-magic-insights .c3 { --bg: var(--c3); }

.pv-magic-insights .lab {
  position: absolute; left: 3cqw; top: 50%; translate: 0 -50%;
  font: 300 3.3cqw/1 var(--mono); text-transform: uppercase; letter-spacing: .02em; white-space: nowrap;
  opacity: 0; transition: opacity .5s ease .35s;
}
.pv-magic-insights .row.on .lab { opacity: 1; }

@keyframes mi-blink { 50% { opacity: 0; } }

/* ---------- 03 · WHO COVID-19 timeline ----------
   Colours are variables so the card (dark) and the case study demo (paper) both use the site's palette. */
.pv-who-covid {
  --wv-ink: #ecebe3; --wv-win: #3fb1ea; --wv-win-fill: rgba(0, 141, 201, .22);
  --wv-b1: #12395f; --wv-b2: #2f7ab0; --wv-b3: #7fc3de;
  --wv-k0: #8b66e8; --wv-k1: #e4dc3c; --wv-k2: #19b88a; --wv-k3: #d044ae; --wv-k4: #e07a3a; --wv-k5: #eab030;   /* WHO's action categories */
  color: var(--wv-ink);
}
.fig[data-tone="cream"] .pv-who-covid, .fig .pv-who-covid.on-paper {
  --wv-ink: #1b1a17; --wv-win: #1b1a17; --wv-win-fill: rgba(188, 203, 216, .45);
  --wv-b1: #5f5c33; --wv-b2: #9ba17c; --wv-b3: #d7ccb3;
  --wv-k0: #7f9bb4; --wv-k1: #d4bf3e; --wv-k2: #7f8a5c; --wv-k3: #b8505c; --wv-k4: #d58a3c; --wv-k5: #a8997a;
}
.pv-who-covid .wv-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pv-who-covid .wv-date { position: absolute; left: 7%; top: 6cqw; font: 300 3.1cqw/1 var(--mono); text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; opacity: .8; }
.fig .pv-who-covid .wv-date { font-size: clamp(11px, 1.05vw, 14px); left: 3%; top: 4.5%; }

/* ---------- 04 · Work Enemies ---------- */
.pv-work-enemies .we-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.fig .pv-work-enemies .we-cv { cursor: crosshair; }

/* ---------- 06 · Breaking Barriers ---------- */
.pv-breaking-barriers { --bb-dot: #3f6f6b; --bb-pale: rgba(63, 111, 107, .22); --bb-hot: #ef8a62; }
.pv-breaking-barriers .bb-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pv-breaking-barriers .bb-num { position: absolute; left: 9%; top: 6%; color: #1b1a17; display: grid; gap: 1.6cqw; }
.pv-breaking-barriers .bb-num b { font: italic 400 19cqw/.85 var(--serif); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.pv-breaking-barriers .bb-num span { font: 300 2.9cqw/1 var(--mono); text-transform: uppercase; letter-spacing: .02em; opacity: .7; }

/* ---------- 03 · Zora Ecosystems ----------
   The card is product UI, so it uses a neutral UI face rather than the site's mono and serif. */
.pv-zora { --ui: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif; --txt: #4a4a47; --soft: #8e8e8a; }
.pv-zora .zr { position: absolute; inset: 0; }
.pv-zora .zr-card {
  position: absolute; left: 7cqw; top: 9cqw; width: 86cqw; height: 107.5cqw; background: #fff; border-radius: 3.4cqw; overflow: hidden; font-family: var(--ui);
  box-shadow: 0 .4cqw 1.2cqw rgba(30, 50, 35, .10), 0 2cqw 5cqw rgba(30, 50, 35, .12);
  transition: transform .85s cubic-bezier(.65, 0, .15, 1);
}
.pv-zora .zr-card[data-pos="0"] { z-index: 3; }
.pv-zora .zr-card:not([data-pos="0"]) { transform: translateX(112cqw); }
.pv-zora .zr-card.zr-fly { transform: translateX(-112cqw); }
.pv-zora .zr-title { position: absolute; left: 6.5cqw; top: 9cqw; width: 33cqw; font: 500 5.5cqw/1.22 var(--ui); letter-spacing: -.01em; color: var(--txt); }
.pv-zora .zr-pic { position: absolute; right: -19cqw; top: -23cqw; width: 66cqw; height: 66cqw; border-radius: 50%; overflow: hidden; background: #e8ece4; }
.pv-zora .zr-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-zora .zr-badge { position: absolute; left: 41cqw; top: 26.5cqw; width: 12.5cqw; height: 12.5cqw; border-radius: 50%; background: #c9e58f; display: grid; place-items: center; z-index: 3; }
.pv-zora .zr-badge svg { width: 10.4cqw; height: 10.4cqw; fill: #fff; stroke: none; }
.pv-zora .zr-rows { position: absolute; left: 6.5cqw; right: 6.5cqw; top: 50cqw; display: grid; gap: 5.6cqw; }
.pv-zora .zr-line { display: flex; justify-content: space-between; align-items: baseline; font: 400 4.5cqw/1 var(--ui); color: var(--txt); }
.pv-zora .zr-val { font-variant-numeric: tabular-nums; font-weight: 500; }
.pv-zora .zr-val i { font-style: normal; font-weight: 400; color: var(--soft); margin-left: .5cqw; }
.pv-zora .zr-track { margin-top: 2.2cqw; height: 1.7cqw; border-radius: 1cqw; background: #f3f3f0; overflow: hidden; }
.pv-zora .zr-fill { height: 100%; width: 0; border-radius: 1cqw; background: var(--c); transition: width 1s cubic-bezier(.16, 1, .3, 1); }
.pv-zora .r0 { --c: #5a8f44; } .pv-zora .r1 { --c: #c8e48e; } .pv-zora .r2 { --c: #f1e39a; } .pv-zora .r3 { --c: #cf5f50; }

/* ---------- 01 · Magic Charts ----------
   Built to look like the chart panel: pills spanning the card's width, then a white card. */
.pv-magic-charts { --ui: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif; color: #2b2b2a; }
.pv-magic-charts .mc-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pv-magic-charts .mc-types { position: absolute; left: 7cqw; right: 7cqw; top: 6cqw; height: 12cqw; }
.pv-magic-charts .mc-row { display: flex; gap: 2.4cqw; height: 100%; }
.pv-magic-charts .mc-row span { flex: 1; display: grid; place-items: center; padding-top: .7cqw; border-radius: 99px; background: #fff; border: .55cqw solid rgba(46, 58, 78, .15); font: 400 4.6cqw/1 var(--ui); color: #2b2b2a; transition: background .45s ease, border-color .45s ease, color .45s ease; }
.pv-magic-charts .mc-row span.on { background: #efe9fd; border-color: #8a4cf0; color: #3f2a7a; }

/* ---------- 06 · This is Ella ---------- */
.pv-this-is-ella .el-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ---------- 07 · Digital Twins ----------
   A recreation of the ECMWF slide: the real Earth on the left, its digital twin on the right. */
.pv-digital-twins .dt-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ---------- 01 · Customisable motion elements ----------
   The slider floats over the drawing and copies the Edit panel's number-and-slider control. */
.pv-cavalry { --ui: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif; }
.pv-cavalry .cv-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pv-cavalry .cv-ctl {
  position: absolute; left: 7cqw; right: 7cqw; bottom: 7cqw; padding: 5.2cqw 5.4cqw 5cqw; background: #fff; border-radius: 3.4cqw; font-family: var(--ui); color: #1b1a17;
  box-shadow: 0 .4cqw 1.2cqw rgba(30, 28, 20, .08), 0 2cqw 5cqw rgba(30, 28, 20, .14);
}
.pv-cavalry .cv-lab { font: 400 4.2cqw/1 var(--ui); }
.pv-cavalry .cv-row { display: flex; align-items: center; gap: 4.4cqw; margin-top: 4.4cqw; }
.pv-cavalry .cv-track { position: relative; flex: 1; height: 1.5cqw; border-radius: 1cqw; background: #e9e3fa; }
.pv-cavalry .cv-track i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 1cqw; background: #8a4cf0; }
.pv-cavalry .cv-track b { position: absolute; top: 50%; left: 0; width: 5.4cqw; height: 5.4cqw; margin: -2.7cqw 0 0 -2.7cqw; border-radius: 50%; background: #fff; box-shadow: 0 .3cqw 1.2cqw rgba(0, 0, 0, .35); }
.pv-cavalry .cv-n { flex: none; width: 12.5cqw; height: 11cqw; display: grid; place-items: center; border: .5cqw solid #dcdcd8; border-radius: 2cqw; font: 400 4.6cqw/1 var(--ui); font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  .pv, .pv * { animation: none !important; }
}

/* ---------- 04b · Work Enemies, the game (case study only) ----------
   Sizes are in --u, one design pixel of a 920-wide card (800 on phones), so the card scales as a unit. */
.pv-work-enemies-game { display: block; }
.pv-work-enemies-game .wg {
  --d: 920; --u: calc(100cqw / var(--d));
  position: absolute; top: 4%; bottom: 4%; left: 50%; transform: translateX(-50%);
  aspect-ratio: 920 / 676; container-type: inline-size;
  color: #2b2a33; font-family: Verdana, Geneva, sans-serif;
}
.pv-work-enemies-game .wg h3 { position: absolute; left: calc(var(--u) * 71); top: calc(var(--u) * 40); margin: 0; font: 700 calc(var(--u) * 26)/1.2 Verdana, Geneva, sans-serif; letter-spacing: 0; text-transform: none; }
.pv-work-enemies-game .wg-key { position: absolute; left: calc(var(--u) * 71); right: calc(var(--u) * 71); top: calc(var(--u) * 100); margin: 0; padding: 0; list-style: none; display: flex; justify-content: space-between; align-items: flex-start; border: 0; }
.pv-work-enemies-game .wg-key li { position: relative; display: block; flex: none; padding: 0 0 0 calc(var(--u) * 36); border: 0; font: 400 calc(var(--u) * 18)/1.25 Verdana, Geneva, sans-serif; letter-spacing: 0; text-transform: none; color: #2d2d35; }
.pv-work-enemies-game .wg-key i { position: absolute; left: 0; top: calc(var(--u) * 3); width: calc(var(--u) * 22); height: calc(var(--u) * 22); }
.pv-work-enemies-game .wg-key b { display: block; font-weight: 400; white-space: nowrap; }
.pv-work-enemies-game .wg-key span { display: block; font-size: calc(var(--u) * 14); color: #55555c; margin-top: calc(var(--u) * 4); }
.pv-work-enemies-game .wg-board { position: absolute; left: calc(var(--u) * 24); right: calc(var(--u) * 24); top: calc(var(--u) * 187); aspect-ratio: calc(var(--d) - 48) / 427; border-top: 1px solid rgba(43, 42, 51, .14); }
.pv-work-enemies-game .wg-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }
@media (max-width: 700px) {
  .fig.wg-fig { --ar: 800 / 780 !important; }
  .fig.wg-fig .pv-work-enemies-game .wg { --d: 800; aspect-ratio: 800 / 780; top: 0; bottom: 0; }
  .fig.wg-fig .wg-board { top: calc(var(--u) * 291); }
  .fig.wg-fig .wg h3 { left: calc(var(--u) * 24); }
  .fig.wg-fig .wg-key { left: calc(var(--u) * 24); right: calc(var(--u) * 24); display: grid; grid-template-columns: 1fr 1fr; row-gap: calc(var(--u) * 20); }
  .fig.wg-fig .wg-key li { font-size: calc(var(--u) * 26); }
  .fig.wg-fig .wg-key span { font-size: calc(var(--u) * 20); }
  .fig.wg-fig .wg-key i { width: calc(var(--u) * 28); height: calc(var(--u) * 28); }
  .fig.wg-fig .wg-key li { padding-left: calc(var(--u) * 48); }
}
.fig.wg-fig .media { background: #fff; }
