/* Pinterest Studio: builds on project.css.

   Told like the final presentation, on its warm off-white: a pile of saved pins that grows as
   you scroll, the wheel of where Pinterest stops helping, seven features that take turns,
   Leah's project in five red acts, and before/after rows where the answer wipes in.
   Scroll pieces live in ../home/pinterest.js. */

/* ---------- Theme: Pinterest red on the deck's warm paper ---------- */
.pinterest {
  --pn-red: #ad001a; /* from the deck */
  --pn-red-2: #8e0016;
  --pn-paper: #fcfaf7; /* slide background; the exported images sit on it */
  --pn-panel: #f1ede8; /* the deck's panels */
  --pn-ink: #161413;

  --color-bg-primary: var(--pn-paper);
  --color-bg-secondary: var(--pn-panel);
  --color-bg-brand: var(--pn-red);
  --color-bg-brand-hover: var(--pn-red-2);
  --color-bg-brand-subtle: #f9e8ea;
  --color-text-brand: var(--pn-red);
  --color-border-brand: var(--pn-red);
  --color-icon-brand: var(--pn-red);
  --pj-brand-light: #ff7d8d;
}

.pn-brand {
  color: var(--color-text-brand);
}

.pn-center {
  max-width: none;
  text-align: center;
  text-wrap: balance;
}

/* Containers inside a full-width section still span it (auto margins would shrink them). */
.pj-sec > .container {
  width: 100%;
}

.pn-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-5xl);
}

.pn-src {
  margin: var(--space-sm) 0 0;
  color: var(--color-text-tertiary);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line-height, 1.4);
}

/* ---------- The show reel, as the cover ---------- */
.pn-reel video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-xl);
  background: #e9e4df; /* the reel's own background, while it loads */
}

/* ---------- 03 The product: the screen recordings in a phone or on a laptop ---------- */
/* Links to the live build, under the heading. */
.pn-live {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

.pn-live__alt {
  padding: var(--space-md) var(--space-2xl);
  border: 1.5px solid var(--pn-ink);
  border-radius: var(--radius-full);
  color: var(--pn-ink);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.pn-live__alt:hover {
  background: var(--pn-ink);
  color: var(--color-neutral-50);
  transform: translateY(-2px);
}

/* The product tour: every screen on the left, its text on the right. Tighter than the other
   case studies, with smaller phones and bigger laptops. */
#product .pj-tour {
  gap: var(--space-8xl);
}

.pn-stop--phone {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.pn-stop--laptop {
  grid-template-columns: minmax(0, 960fr) minmax(0, 400fr);
}

.pn-device {
  display: flex;
  justify-content: center;
}

/* A phone drawn in CSS around the recording (the recordings are the screen only). */
.pn-phone {
  width: min(100%, 250px);
  padding: 8px;
  border-radius: 42px;
  background: #0b0b0c;
  box-shadow: 0 0 0 1.5px #2a2a2c inset, 0 30px 60px -20px rgb(60 20 10 / 0.35), 0 12px 24px -12px rgb(0 0 0 / 0.25);
}

/* The video keeps the recording's own proportions, so nothing at its edges is cropped. */
.pn-phone video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 600 / 1302;
  border-radius: 34px;
  object-fit: contain;
  background: var(--pn-panel);
}

/* The laptop mockup's screen: left 13.52%, top 6.37%, 72.9% × 77.75% (the web recordings fill it). */
.pj-laptop.pn-laptop video {
  left: 13.52%;
  top: 6.37%;
  width: 72.9%;
  height: 77.75%;
  object-fit: cover;
  object-position: top;
  clip-path: none;
  background: #fbfaf7;
}

@media (max-width: 1099px) {
  .pn-stop--phone,
  .pn-stop--laptop {
    grid-template-columns: minmax(0, 1fr);
  }

  .pn-phone {
    width: min(100%, 230px);
  }
}

/* ---------- 01 The pile: one pin, then 3, 9, 27, 81, then creator's block ---------- */
.pn-pile {
  position: relative;
}

.has-js .pn-pile {
  height: 420vh; /* the scroll that grows the pile */
}

.has-js .pn-pile.is-still {
  height: auto;
}

.pn-pile__stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.has-js .pn-pile__stage {
  position: sticky;
  top: 0;
}

/* The 1920×1080 slide, scaled to cover the screen (phones see its middle). */
.pn-pile__board {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100vw, 100svh * 16 / 9);
  aspect-ratio: 16 / 9;
  translate: -50% -50%;
}

.pn-pile__board img {
  position: absolute;
  border-radius: 6px;
  opacity: 0;
  scale: 0.6;
  transition: opacity 0.45s ease, scale 0.55s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.pn-pile__board img.is-on {
  opacity: 1;
  scale: 1;
}

/* A red Save pill on the very first pin, like the opening slide. */
.pn-pile__save {
  position: absolute;
  padding: 0.5em 1.1em;
  border-radius: var(--radius-full);
  background: var(--pn-red);
  color: var(--color-neutral-50);
  font-family: var(--font-family-display);
  font-weight: 600;
  font-size: clamp(11px, 0.9vw, 15px);
  line-height: 1;
  translate: -50% 0;
  transition: opacity 0.3s ease;
}

.pn-pile.is-saved .pn-pile__save {
  opacity: 0;
}

/* Skip the pile: jumps to the problem statement. */
.pn-pile__skip {
  position: absolute;
  right: var(--page-margin);
  bottom: var(--space-5xl);
  z-index: 2;
  padding: 0.5em 1.1em;
  border: var(--border-width-thin, 1px) solid var(--color-border-strong);
  border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--pn-paper) 85%, transparent);
  color: var(--color-text-primary);
  font-family: var(--font-family-display);
  font-weight: 600;
  font-size: var(--type-body-sm-size);
  line-height: 1.2;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.pn-pile__skip:hover,
.pn-pile__skip:focus-visible {
  border-color: var(--pn-ink);
  background: var(--pn-ink);
  color: var(--color-neutral-50);
}

#statement {
  scroll-margin-top: calc(var(--layout-nav-height) + 80px);
}

@media (max-width: 767px) {
  .pn-pile__skip {
    top: calc(var(--layout-nav-height) + 64px);
    bottom: auto;
  }
}

/* The narration: a line and a count, on a soft band of paper at the bottom. */
.pn-pile__say {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-9xl) var(--page-margin) var(--space-5xl);
  background: linear-gradient(to bottom, transparent, var(--pn-paper) 62%);
  text-align: center;
  transition: opacity 0.4s ease;
}

.pn-pile.is-blocked .pn-pile__say {
  opacity: 0;
}

.pn-pile__line {
  margin: 0;
  font-family: var(--font-family-display);
  font-weight: 600;
  font-size: clamp(30px, 3.6vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  transition: opacity 0.25s ease, translate 0.35s ease;
}

.pn-pile__line.is-changing {
  opacity: 0;
  translate: 0 8px;
}

.pn-pile__count {
  margin: 0;
  padding: 0.45em 1em;
  border-radius: var(--radius-full);
  background: var(--pn-ink);
  color: var(--color-neutral-50);
  font-family: var(--font-family-display);
  font-weight: 600;
  font-size: var(--type-body-sm-size);
  line-height: 1.2;
}


/* The wash and the line that lands on top of the full pile. */
.pn-pile__end {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  padding: var(--page-margin);
  background: color-mix(in srgb, var(--pn-paper) 86%, transparent);
  text-align: center;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.pn-pile.is-blocked .pn-pile__end {
  opacity: 1;
}

.pn-pile__title {
  margin: 0;
  font-family: var(--font-family-display);
  font-weight: 600;
  font-size: clamp(40px, 9vw, 150px);
  line-height: 1;
  letter-spacing: -0.04em;
  translate: 0 24px;
  transition: translate 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pn-pile.is-blocked .pn-pile__title {
  translate: 0 0;
}

.pn-pile__sub {
  margin: 0;
  color: var(--color-text-primary);
  font-size: var(--type-body-lg-size);
  line-height: var(--type-body-lg-line-height);
}

/* Without JS (or with reduced motion) the pile simply shows full, with the line on top. */
html:not(.has-js) .pn-pile__board img,
.pn-pile.is-still .pn-pile__board img {
  opacity: 1;
  scale: 1;
}

html:not(.has-js) .pn-pile__end,
.pn-pile.is-still .pn-pile__end {
  opacity: 1;
}

/* ---------- Stats: the context numbers in Pinterest red ---------- */
.pn-stats dt {
  color: var(--color-text-brand);
  font-size: var(--pj-figure);
  line-height: 1;
}

.pn-stats dd:not(.pn-src) {
  margin-top: var(--space-md);
  color: var(--color-text-primary);
  font-size: var(--type-body-lg-size);
  line-height: var(--type-body-lg-line-height);
}

.pn-src a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- 04 The problem: the numbers and a voice under the chart ---------- */
.pn-gap {
  margin-top: var(--space-7xl);
}

/* What people say: one quote, in red. */
.pn-voices {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: none;
}

.pn-voice {
  margin: 0;
  padding-top: var(--space-3xl);
  border-top: 1px solid var(--color-border-primary, rgba(22, 20, 19, 0.12));
}

.pn-voice__who {
  margin: var(--space-6xl) 0 var(--space-lg);
  color: var(--color-text-tertiary);
  font-size: var(--type-caption-size);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pn-voice blockquote {
  margin: 0;
  font-family: var(--font-family-display);
  font-weight: 600;
  font-size: clamp(22px, 2.5vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-wrap: pretty;
}

.pn-voice:first-child blockquote {
  color: var(--color-text-brand);
}

@media (max-width: 767px) {
  .pn-voices {
    grid-template-columns: minmax(0, 1fr);
  }
}

.pn-voice figcaption {
  margin-top: var(--space-lg);
  color: var(--color-text-tertiary);
  font-size: var(--type-body-size, 16px);
}

.pn-voice figcaption a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- 04 The problem: how far Pinterest guides a creator (a line chart) ---------- */
/* Half and half: the title on the left, the chart on the right. */
.pn-curve {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--space-5xl);
  align-items: start;
}

.pn-curve__title {
  margin: 0;
  font-family: var(--font-family-display);
  font-weight: 600;
  font-size: clamp(36px, 4.6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.pn-curve__title em {
  display: block;
}

.pn-curve__chart {
  margin: 0;
  padding-top: 26px; /* room for the zone tags */
}

/* The plot keeps the slide's 1520 × 482 proportions; dots and tags sit on it in its units. */
/* Taller than the slide's 1520 × 482 so the drop reads at half width; the curve stretches with it. */
.pn-curve__plot {
  position: relative;
  aspect-ratio: 1520 / 820;
}

.pn-curve__plot svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.pn-curve__zone {
  fill: var(--pn-panel);
}

.pn-curve__base {
  fill: var(--pn-ink);
}

.pn-curve__line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.pn-curve__line--guided {
  stroke: var(--pn-ink);
}

.pn-curve__line--drop {
  stroke: var(--pn-red);
}

.pn-curve__dot {
  position: absolute;
  left: calc((var(--x) - 200) / 1520 * 100%);
  top: calc((var(--y) - 380) / 482 * 100%);
  width: clamp(10px, 1vw, 14px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--pn-ink);
  translate: -50% -50%;
}

.pn-curve__dot--off {
  border: 2.5px solid var(--pn-red);
  background: var(--pn-paper);
}

.pn-curve__tag {
  position: absolute;
  top: -26px;
  left: calc((var(--x) - 200) / 1520 * 100%);
  margin: 0;
  color: var(--color-text-secondary);
  font-weight: 500;
  font-size: var(--type-label-size);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pn-curve__tag--off {
  color: var(--color-text-brand);
}

.pn-curve__stages {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: var(--space-xl) 0 0;
  padding: 0;
  list-style: none;
  text-align: center;
}

.pn-curve__stages li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pn-curve__stages strong {
  font-family: var(--font-family-display);
  font-weight: 600;
  font-size: var(--type-body-lg-size);
  line-height: 1.2;
}

.pn-curve__stages span {
  color: var(--color-text-secondary);
  font-size: var(--type-caption-size);
  line-height: 1.3;
}

.pn-curve__stages .is-off strong {
  color: var(--color-text-brand);
}

/* Phones: a taller plot (the line stretches with it), the zone tags above it, and short labels. */
@media (max-width: 767px) {
  .pn-curve__tag {
    font-size: 10px;
  }

  .pn-curve__stages strong {
    font-size: 11px;
    letter-spacing: -0.01em;
  }

  .pn-curve__stages span {
    display: none;
  }
}

/* The problem statement: white type over a darkened moodboard photo, shown whole (16:9). */
.pn-statement {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xl);
  aspect-ratio: 16 / 9;
  padding: var(--space-5xl);
  border-radius: var(--radius-xl);
  background: #1c1b1a url("/pinterest/media/story/statement-bg.jpg") center / cover no-repeat;
  color: var(--color-neutral-50);
  text-align: center;
}

.pn-statement .pj-label {
  color: var(--color-neutral-50);
}

.pn-statement__big {
  max-width: 32ch;
  margin: 0;
  font-family: var(--font-family-display);
  font-weight: 600;
  font-size: clamp(24px, 3vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

/* all white here, the emphasis included */
.pn-statement__big em {
  color: inherit;
}

/* ---------- 06 Landscape comparison: the tools creators already use (three cards) ---------- */
.pn-tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3xl);
  margin: 0;
  padding: 0;
  list-style: none;
}

.pn-tools > li {
  display: flex;
  flex-direction: column;
  min-height: 460px;
  padding: var(--space-3xl);
  border-radius: var(--radius-xl);
  background: var(--pn-panel);
}

.pn-tools__name {
  margin: 0 0 auto;
  font-family: var(--font-family-display);
  font-weight: 600;
  font-size: clamp(28px, 2.6vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.pn-tools__fig {
  margin: var(--space-4xl) 0 0;
  color: var(--color-text-brand);
  font-family: var(--font-family-display);
  font-weight: 700;
  font-size: var(--pj-figure);
  line-height: 1;
  letter-spacing: -0.04em;
}

.pn-tools__what {
  margin: var(--space-md) 0 0;
  color: var(--color-text-primary);
  font-size: var(--type-body-lg-size);
  line-height: var(--type-body-lg-line-height);
}

.pn-tools__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin: var(--space-2xl) 0 0;
  padding: 0;
  list-style: none;
}

.pn-tools__tags li {
  padding: 6px 14px;
  border: 1px solid var(--color-border-primary, rgba(22, 20, 19, 0.12));
  border-radius: var(--radius-full);
  background: var(--pn-paper);
  font-size: var(--type-body-sm-size);
  font-weight: 500;
}

.pn-tools__close {
  margin: var(--space-6xl) 0 0;
  font-family: var(--font-family-display);
  font-weight: 600;
  font-size: clamp(26px, 3vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-align: center;
  text-wrap: balance;
}

/* ---------- 07 Takeaways: three cards, the middle one loud ---------- */
.pn-takes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2xl);
  margin: 0;
  padding: 0;
  list-style: none;
}

.pn-takes li {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--space-lg);
  min-height: 300px;
  padding: var(--space-3xl);
  border-radius: var(--radius-xl);
  background: var(--pn-panel);
}

.pn-takes p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--type-body-md-size);
  line-height: var(--type-body-md-line-height);
}

.pn-takes .pn-takes__loud {
  background: var(--pn-red);
  color: var(--color-neutral-50);
}

.pn-takes .pn-takes__loud p {
  color: color-mix(in srgb, var(--color-neutral-50) 85%, transparent);
}

/* ---------- 08 Moodboard directions: three boards ---------- */
.pn-dirs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2xl);
  margin: 0;
  padding: 0;
  list-style: none;
}

.pn-dirs li {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.pn-dirs img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: var(--space-md);
  border-radius: var(--radius-lg);
}

.pn-dirs p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--type-body-md-size);
  line-height: var(--type-body-md-line-height);
}

/* ---------- 09 The final moodboard ---------- */
.pn-final {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-5xl);
  align-items: end;
}

.pn-final__head {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.pn-final__points {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-2xl);
}

.pn-final__points > div {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding-top: var(--space-md);
  border-top: 2px solid var(--pn-red);
}

.pn-final__points p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--type-body-md-size);
  line-height: var(--type-body-md-line-height);
}

.pn-final__board {
  margin: 0;
}

/* The final moodboard: a still of the slide (its 48px margins trimmed, so 1824 × 984 slide
   units) with the prototype's three loops laid over it. --u is one slide unit. home/pinterest.js
   steps data-cards, data-tabs and data-feed and sets each loop's transition time. */
.pn-mb {
  --u: calc(100cqw / 1824);
  position: relative;
  container-type: inline-size;
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.pn-mb img {
  display: block;
}

.pn-mb__base {
  width: 100%;
  height: auto;
}

.pn-mb__cards,
.pn-mb__tabs,
.pn-mb__feed {
  position: absolute;
}

/* The cards: at rest three in a row; then the middle one steps forward and the others settle back. */
.pn-mb__cards {
  left: calc(1137 * var(--u));
  top: calc(193 * var(--u));
}

.pn-mb__card {
  position: absolute;
  top: 0;
  height: calc(269 * var(--u));
  transform-origin: 0 0;
  transition: transform var(--dc, 0.5s) cubic-bezier(0.086, 0.744, 0.107, 1.016);
}

.pn-mb__card--1 { left: 0; width: calc(198 * var(--u)); }
.pn-mb__card--2 { left: calc(214 * var(--u)); width: calc(198 * var(--u)); }
.pn-mb__card--3 { left: calc(427 * var(--u)); width: calc(194 * var(--u)); }

.pn-mb[data-cards="2"] .pn-mb__card--1 { transform: translate(calc(10 * var(--u)), calc(27 * var(--u))) scale(0.899); }
.pn-mb[data-cards="2"] .pn-mb__card--2 { transform: translateX(calc(-10 * var(--u))) scale(1.096); }
.pn-mb[data-cards="2"] .pn-mb__card--3 { transform: translate(calc(10 * var(--u)), calc(27 * var(--u))) scale(0.902); }

/* The tab bar: the dark indicator stretches to the next tab, then lets go of the last one.
   The white labels are clipped to the indicator, so a label turns white as it's covered. */
.pn-mb__tabs {
  --ix: 4;
  --iw: 88;
  left: calc(664 * var(--u));
  top: calc(496 * var(--u));
  width: calc(272 * var(--u));
  height: calc(40 * var(--u));
}

.pn-mb__tabs img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.pn-mb__tabs span {
  position: absolute;
  top: calc(4 * var(--u));
  left: calc(var(--ix) * var(--u));
  width: calc(var(--iw) * var(--u));
  height: calc(32 * var(--u));
  border-radius: calc(16 * var(--u));
  background: #1e1a18;
}

.pn-mb__tabs .pn-mb__tabs-on {
  clip-path: inset(calc(4 * var(--u)) calc((272 - var(--ix) - var(--iw)) * var(--u)) calc(4 * var(--u)) calc(var(--ix) * var(--u)) round calc(16 * var(--u)));
}

.pn-mb__tabs span,
.pn-mb__tabs .pn-mb__tabs-on {
  transition: left var(--dt, 0.3s), width var(--dt, 0.3s), clip-path var(--dt, 0.3s);
  transition-timing-function: cubic-bezier(0.45, 0, 0.15, 1);
}

.pn-mb[data-tabs="2"] .pn-mb__tabs { --iw: 176; }
.pn-mb[data-tabs="3"] .pn-mb__tabs { --ix: 92; }
.pn-mb[data-tabs="4"] .pn-mb__tabs { --ix: 92; --iw: 176; }
.pn-mb[data-tabs="5"] .pn-mb__tabs { --ix: 180; }
.pn-mb[data-tabs="6"] .pn-mb__tabs { --iw: 264; }

/* The feed: a pin is pressed, the column beside it gives way, then Save unfolds on it. */
.pn-mb__feed {
  left: calc(634 * var(--u));
  top: calc(733 * var(--u));
  width: calc(404 * var(--u));
  height: calc(251 * var(--u));
  overflow: hidden;
  border-radius: calc(20 * var(--u));
}

.pn-mb__phone {
  position: absolute;
  left: calc(14 * var(--u));
  top: calc(-183 * var(--u));
}

.pn-mb__pin {
  --r: 16;
  position: absolute;
  left: calc(var(--x) * var(--u));
  top: calc(var(--y) * var(--u));
  width: calc(var(--w) * var(--u));
  height: calc(var(--h) * var(--u));
  overflow: hidden;
  border-radius: calc(var(--r) * var(--u));
  background: #e9e4df;
  transition-property: left, top, width, height, border-radius;
  transition-duration: var(--df, 0.5s);
  transition-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pn-mb__pin--1-1 { --x: 16; --y: 27; --w: 174; --h: 214; }
.pn-mb__pin--1-2 { --x: 16; --y: 251; --w: 174; --h: 164; }
.pn-mb__pin--1-3 { --x: 16; --y: 425; --w: 174; --h: 224; }
.pn-mb__pin--2-1 { --x: 200; --y: 27; --w: 174; --h: 164; }
.pn-mb__pin--2-2 { --x: 200; --y: 201; --w: 174; --h: 224; }
.pn-mb__pin--2-3 { --x: 200; --y: 435; --w: 174; --h: 174; }

.pn-mb:not([data-feed="1"]) .pn-mb__pin--1-1 { --x: 16; --y: 27; --w: 158; --h: 214; }
.pn-mb:not([data-feed="1"]) .pn-mb__pin--1-2 { --x: 16; --y: 251; --w: 158; --h: 152; }
.pn-mb:not([data-feed="1"]) .pn-mb__pin--1-3 { --x: 16; --y: 413; --w: 158; --h: 224; }
.pn-mb:not([data-feed="1"]) .pn-mb__pin--2-1 { --x: 184; --y: 27; --w: 190; --h: 164; }
.pn-mb:not([data-feed="1"]) .pn-mb__pin--2-2 { --x: 184; --y: 201; --w: 190; --h: 244; }
.pn-mb:not([data-feed="1"]) .pn-mb__pin--2-3 { --x: 184; --y: 455; --w: 190; --h: 174; }
.pn-mb:not([data-feed="1"]) .pn-mb__pin--2-2 { --r: 22; }

.pn-mb__pin > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pn-mb__credit {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: calc(48 * var(--u));
  background: #e9e4df;
}

.pn-mb__credit img {
  position: absolute;
  top: calc(8 * var(--u));
  left: calc(8 * var(--u));
  width: calc(32 * var(--u));
  height: calc(32 * var(--u));
  border-radius: 50%;
}

.pn-mb__credit i {
  position: absolute;
  left: calc(48 * var(--u));
  top: calc(12 * var(--u));
  width: calc(62 * var(--u));
  height: calc(8 * var(--u));
  border-radius: calc(4 * var(--u));
  background: rgba(30, 26, 24, 0.55);
}

.pn-mb__credit i + i {
  top: calc(28 * var(--u));
  width: calc(46 * var(--u));
  height: calc(6 * var(--u));
  border-radius: calc(3 * var(--u));
  background: rgba(139, 131, 124, 0.6);
}

.pn-mb__credit svg {
  position: absolute;
  top: calc(14 * var(--u));
  right: calc(8 * var(--u));
  width: calc(20 * var(--u));
  height: calc(20 * var(--u));
}

.pn-mb__save {
  position: absolute;
  top: calc(8 * var(--u));
  right: calc(8 * var(--u));
  display: flex;
  align-items: center;
  gap: calc(8 * var(--u));
  width: calc(36 * var(--u));
  height: calc(36 * var(--u));
  padding-left: calc(8 * var(--u));
  overflow: hidden;
  border-radius: calc(18 * var(--u));
  background: #e60023;
  opacity: 0;
  transition-property: width, height, opacity, background-color;
  transition-duration: var(--df, 0.5s);
  transition-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pn-mb__save svg {
  flex: none;
  width: calc(20 * var(--u));
  height: calc(20 * var(--u));
}

.pn-mb__save b {
  color: var(--color-neutral-50);
  font-family: var(--font-family-display);
  font-weight: 600;
  font-size: calc(13 * var(--u));
  white-space: nowrap;
  opacity: 0;
  transition: opacity var(--df, 0.5s);
}

.pn-mb:not([data-feed="1"]) .pn-mb__save {
  opacity: 1;
  background: var(--pn-red);
}

.pn-mb[data-feed="3"] .pn-mb__save {
  width: calc(83 * var(--u));
  height: calc(32 * var(--u));
}

.pn-mb[data-feed="3"] .pn-mb__save b {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .pn-mb * {
    transition: none !important;
  }
}

/* ---------- 10 Fidelity reel: three stages, not CNN's four ---------- */
#fidelity .reel__stops {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ---------- 11 Iterations after testing: each half is its sand mockup, edge to edge ---------- */
/* The mockup fills the whole half (white sand before, black sand after) and the note sits on
   the open sand at the bottom left, clear of the phone. The halves are sized so the whole
   slide and its arrows fit on screen at once. */
.pn-bacar .pj-slide__half {
  position: relative;
  display: block;
  height: clamp(420px, calc(100vh - 250px), 680px);
  overflow: hidden;
}

.pn-bacar .pn-bacar__screen {
  position: absolute;
  inset: 0;
}

.pn-bacar .pj-slide__half .pn-bacar__mock {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pn-bacar .pj-slide__half figcaption {
  position: absolute;
  z-index: 1;
  top: auto;
  right: auto;
  bottom: 0;
  left: 0;
  max-width: min(46%, 300px);
  background: none;
}

/* before: dark ink on the white sand */
.pn-bacar .pj-slide__half--dark figcaption,
.pn-bacar .pj-slide__half--dark .pj-slide__title {
  color: var(--pn-ink);
}

.pn-bacar .pj-slide__half--dark .pj-slide__tag,
.pn-bacar .pj-slide__half--dark figcaption p:last-child {
  color: #4a4642;
}

/* after: light text on the black sand */
.pn-bacar .pj-slide__half--light figcaption,
.pn-bacar .pj-slide__half--light .pj-slide__title {
  color: var(--color-neutral-50);
}

.pn-bacar .pj-slide__half--light .pj-slide__tag {
  color: #ff8a8a;
}

.pn-bacar .pj-slide__half--light figcaption p:last-child {
  color: #cfcac4;
}

/* ---------- Ending: the board, veiled, with the closing line on top ---------- */
/* within the page margins, like the other sections */
.pn-end {
  margin-top: var(--space-9xl);
}

.pn-end__frame {
  position: relative;
  overflow: hidden;
  container-type: inline-size;
  border-radius: var(--radius-xl);
  background: #2a2a1f;
}

.pn-end img {
  display: block;
  width: 100%;
  height: auto;
}

/* as on the slide: Bricolage-like display type, bottom left, in the slide's off-white */
.pn-end__text {
  position: absolute;
  left: calc(48 / 1920 * 100cqw);
  bottom: calc(115 / 1920 * 100cqw);
  margin: 0;
  color: #fcfaf7;
  font-family: var(--font-family-display);
  font-weight: 700;
  font-size: calc(150 / 1920 * 100cqw);
  line-height: 0.92;
  letter-spacing: -0.035em;
}

/* ---------- Smaller screens ---------- */
@media (max-width: 1099px) {
  .pn-final {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
}

@media (max-width: 899px) {
  .pn-curve,
  .pn-tools,
  .pn-takes,
  .pn-dirs {
    grid-template-columns: minmax(0, 1fr);
  }

  .pn-takes li {
    min-height: 0;
  }

  .pn-dirs img {
    max-width: 520px;
  }
}

@media (max-width: 767px) {
  .pn-stats {
    grid-auto-flow: row;
  }

  .pn-statement {
    aspect-ratio: auto;
    padding: var(--space-7xl) var(--space-2xl);
  }

  .pn-final__points {
    grid-template-columns: minmax(0, 1fr);
  }

  /* phones: the note sits above its mockup instead of on it */
  .pn-bacar .pj-slide__half {
    display: flex;
    flex-direction: column;
    height: auto;
    background: var(--pn-panel);
  }

  .pn-bacar .pn-bacar__screen {
    position: static;
  }

  .pn-bacar .pj-slide__half .pn-bacar__mock {
    height: auto;
    aspect-ratio: 1;
  }

  .pn-bacar .pj-slide__half figcaption {
    position: static;
    order: -1;
    width: auto;
    max-width: none;
    padding: var(--space-xl) var(--space-xl) var(--space-lg);
  }

  .pn-bacar .pj-slide__half figcaption,
  .pn-bacar .pj-slide__half .pj-slide__title {
    color: var(--pn-ink);
  }

  .pn-bacar .pj-slide__half figcaption p:last-child {
    color: #4a4642;
  }

  .pn-bacar .pj-slide__half--light .pj-slide__tag {
    color: var(--color-text-brand);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pn-pile__board img {
    transition: none !important;
  }
}
