/* Scroll scenes outside the pinned sections (driven by scroll-scenes.js). Motion only runs when .js-reveal is set. */

/* The question: words light up in reading order as the line scrolls through. */
.pv-word { opacity: var(--word, 1); transition: opacity .3s linear; }

/* Your part: the meal check-in, set as live text inside the approved phone frame.
   Units are cqw of the cropped phone (736 artwork px wide). The screen covers the artwork's
   chat area, between the header rule and the input bar, and anchors the thread to the bottom like iMessage. */
.pv-meal-phone { container-type: inline-size; cursor: default; }
.pv-meal-screen {
  position: absolute;
  left: 5.7065%;
  top: 17.58%;
  width: 88.587%;
  height: 69.318%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  background: #fefefe;
  color: #000;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  text-align: left;
  -webkit-font-smoothing: antialiased;
}
.pv-meal-thread { display: flex; flex-direction: column; gap: .7cqw; margin: 0; padding: 3cqw 3.4cqw 3.2cqw 3.8cqw; list-style: none; }
.pv-meal-thread > .is-hidden { display: none; }
.pv-meal-time, .pv-meal-receipt { color: #8e8e93; font-size: 2.75cqw; font-weight: 500; line-height: 1.3; }
.pv-meal-time { align-self: center; margin-block: .6cqw 1cqw; }
.pv-meal-time b { font-weight: 600; }
.pv-meal-receipt { align-self: flex-end; margin: .2cqw .8cqw 0 0; }
.pv-meal-msg {
  position: relative;
  max-width: 80%;
  padding: 1.9cqw 3.1cqw 2cqw;
  border-radius: 4.9cqw;
  font-size: 3.9cqw;
  line-height: 1.27;
  letter-spacing: -.012em;
  overflow-wrap: break-word;
}
.pv-meal-msg.is-in { align-self: flex-start; background: #e9e9eb; transform-origin: 0 100%; }
.pv-meal-msg.is-out { align-self: flex-end; background: #007bfd; color: #fff; transform-origin: 100% 100%; }
.pv-meal-msg.is-in + .pv-meal-msg.is-out, .pv-meal-receipt + .pv-meal-msg { margin-top: 1.8cqw; }
/* The last bubble in a run gets iMessage's tail: a bubble-coloured curl, trimmed by a screen-coloured curl. */
.pv-meal-msg.is-in.has-tail::before, .pv-meal-msg.is-in.has-tail::after { content: ""; position: absolute; bottom: 0; height: 1em; }
.pv-meal-msg.is-in.has-tail::before { left: -.35em; border-left: 1em solid #e9e9eb; border-bottom-right-radius: .8em .7em; }
.pv-meal-msg.is-in.has-tail::after { left: -.62em; width: .62em; background: #fefefe; border-bottom-right-radius: .5em; }
.pv-meal-msg.is-photo { width: 58%; padding: 0; overflow: hidden; background: none; border-radius: 4.4cqw; line-height: 0; }
.pv-meal-msg.is-photo img { display: block; width: 100%; height: auto; }
.pv-page .pv-meal-msg .pv-meal-check { display: inline-block; width: .82em; height: .72em; margin-left: .12em; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }

/* Playback (scroll-scenes.js): Mura types, the reply springs out of the typing bubble, the thread glides up. */
.pv-meal-msg.is-typing { display: flex; gap: 1.1cqw; padding: 2.5cqw 3.3cqw; animation: pv-meal-pop .42s cubic-bezier(.3, 1.4, .5, 1) both; }
.pv-meal-msg.is-typing i { width: 1.8cqw; height: 1.8cqw; border-radius: 50%; background: #8e8e93; animation: pv-meal-dot 1.2s ease-in-out infinite; }
.pv-meal-msg.is-typing i:nth-child(2) { animation-delay: .16s; }
.pv-meal-msg.is-typing i:nth-child(3) { animation-delay: .32s; }
.pv-meal-msg.is-new { animation: pv-meal-in .62s cubic-bezier(.22, 1.2, .36, 1) both; }
.pv-meal-msg.is-photo.is-new { animation: pv-meal-send .8s cubic-bezier(.16, 1, .3, 1) both; }
.pv-meal-time.is-new, .pv-meal-receipt.is-new { animation: pv-meal-fade .5s ease both; }
.pv-meal-msg.is-new .pv-meal-check path { stroke-dasharray: 20; animation: pv-meal-draw .5s cubic-bezier(.65, 0, .35, 1) .45s both; }
@keyframes pv-meal-in { from { opacity: 0; scale: .78; translate: 0 1.2cqw; } 45% { opacity: 1; } }
@keyframes pv-meal-pop { from { opacity: 0; scale: .5; } }
@keyframes pv-meal-send { from { opacity: 0; scale: .55; translate: 0 22cqw; filter: blur(.5cqw); } 40% { opacity: 1; } 70% { filter: blur(0); } }
@keyframes pv-meal-fade { from { opacity: 0; translate: 0 .6cqw; } }
@keyframes pv-meal-draw { from { stroke-dashoffset: 20; } }
@keyframes pv-meal-dot { 0%, 55%, 100% { opacity: .35; translate: 0 0; } 25% { opacity: .9; translate: 0 -28%; } }

/* Three steps: each dividing rule draws across as its step arrives. */
.js-reveal .pv-three-steps li { position: relative; border-top-color: transparent; }
.js-reveal .pv-three-steps li::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 1px;
  background: linear-gradient(90deg, var(--rose-gold), var(--story-line) 45%);
  transform-origin: left;
  scale: 0 1;
  transition: scale 1.4s var(--reveal-ease);
}
.js-reveal .pv-three-steps li.is-revealed::before { scale: 1 1; transition-delay: calc(var(--reveal-delay, 0ms) + .1s); }

/* Your part: the chores Mura removes are struck through as the section arrives. */
.pv-chores { display: grid; justify-items: start; gap: .75rem; margin: 0; padding: 0; list-style: none; font-size: clamp(1.0625rem, 1.4vw, 1.25rem); }
/* What you do instead: one ticked line, arriving after the strikes. */
.pv-chores .is-yes { display: flex; align-items: center; gap: .45rem; margin-top: .35rem; color: var(--ink); }
.pv-page .pv-chores .is-yes svg { width: 1.05em; height: 1.05em; color: var(--rose-gold); stroke-width: 2; }
.js-reveal .pv-chores .is-yes { opacity: 0; translate: 0 .4em; transition: opacity .6s ease, translate .6s cubic-bezier(.16, 1, .3, 1); }
.js-reveal .pv-chores .is-yes svg { stroke-dasharray: 30; stroke-dashoffset: 30; transition: stroke-dashoffset .6s cubic-bezier(.65, 0, .35, 1); }
.js-reveal .pv-chores.is-revealed .is-yes { opacity: 1; translate: 0 0; transition-delay: 1.8s; }
.js-reveal .pv-chores.is-revealed .is-yes svg { stroke-dashoffset: 0; transition-delay: 2.05s; }
/* Desktop: stacked under the headline, beside the phone. Small screens: under the phone, centred. */
@media (min-width: 861px) {
  .pv-effort .pv-chapter { grid-template-areas: "copy stage" "chores stage"; row-gap: 2rem; }
  .pv-effort .pv-chapter > .pv-copy { grid-area: copy; align-self: end; }
  .pv-effort .pv-chapter > .pv-stage { grid-area: stage; }
  .pv-effort .pv-chapter > .pv-chores { grid-area: chores; align-self: start; }
}
@media (max-width: 860px) {
  .pv-effort .pv-chores { justify-items: center; justify-self: center; }
}
.pv-chores s { position: relative; color: var(--faint); text-decoration: none; }
.pv-chores s::after { content: ""; position: absolute; left: -.15em; right: -.15em; top: 54%; height: 1.5px; border-radius: 1px; background: var(--rose-gold); transform-origin: left; }
.js-reveal .pv-chores s { color: var(--ink-soft); transition: color .6s ease; }
.js-reveal .pv-chores s::after { scale: 0 1; transition: scale .7s cubic-bezier(.65, 0, .35, 1); }
.js-reveal .pv-chores.is-revealed s { color: var(--faint); }
.js-reveal .pv-chores.is-revealed s::after { scale: 1 1; }
.js-reveal .pv-chores.is-revealed li:nth-child(1) s, .js-reveal .pv-chores.is-revealed li:nth-child(1) s::after { transition-delay: .7s; }
.js-reveal .pv-chores.is-revealed li:nth-child(2) s, .js-reveal .pv-chores.is-revealed li:nth-child(2) s::after { transition-delay: 1s; }
.js-reveal .pv-chores.is-revealed li:nth-child(3) s, .js-reveal .pv-chores.is-revealed li:nth-child(3) s::after { transition-delay: 1.3s; }

/* More days: four weeks of nights fill in; evening-walk nights glow rose gold. */
.pv-nights { display: grid; justify-items: center; gap: 1.25rem; }
.pv-nights-weeks { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.25rem 1.75rem; }
.pv-nights-week { display: grid; justify-items: start; gap: .625rem; }
.pv-nights-week small { color: var(--faint); font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; }
.pv-nights-dots { display: flex; gap: 10px; }
.pv-night {
  width: 12px;
  height: 12px;
  box-sizing: border-box;
  border-radius: 50%;
  background: #e9e2d68c;
}
.pv-night.is-walk { background: var(--rose-gold); box-shadow: 0 0 12px #cfa28e59; }
.pv-nights-caption { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1.25rem; margin: 0; color: var(--muted); font-size: .875rem; line-height: 1.5; font-variant-numeric: tabular-nums; }
.pv-nights-walks { display: inline-flex; align-items: center; gap: .5rem; }
.pv-nights-walks i { width: 8px; height: 8px; border-radius: 50%; background: var(--rose-gold); }
.pv-nights-walks b { font-weight: inherit; color: var(--ink-soft); }
.pv-nights-caption > span:last-child { color: var(--faint); }
.pv-nights-key { display: inline-flex; align-items: center; gap: .5rem; }
.pv-nights-key i { width: 8px; height: 8px; border-radius: 50%; background: var(--rose-gold); }
.js-reveal .pv-night {
  border: 1px solid #f5f0e326;
  background: transparent;
  box-shadow: none;
  scale: .7;
  transition: background-color .45s ease, border-color .45s ease, box-shadow .6s ease, scale .5s cubic-bezier(.2, .9, .3, 1.3);
}
.js-reveal .pv-night.is-lit { border-color: transparent; background: #e9e2d68c; scale: 1; }
.js-reveal .pv-night.is-walk.is-lit { background: var(--rose-gold); box-shadow: 0 0 12px #cfa28e59; }
@media (max-width: 600px) {
  .pv-nights-dots { gap: 8px; }
  .pv-night { width: 11px; height: 11px; }
  .pv-nights-weeks { gap: 1rem 1.5rem; }
}

/* Your data, your say: each principle icon draws its outline in. */
.js-reveal .pv-principles .pv-icon svg { stroke-dasharray: 80; stroke-dashoffset: 80; transition: stroke-dashoffset 1.8s cubic-bezier(.65, 0, .35, 1); }
.js-reveal .pv-principles article.is-revealed .pv-icon svg { stroke-dashoffset: 0; transition-delay: calc(var(--reveal-delay, 0ms) + .25s); }

/* Hero and closing skylines: gentle depth as the page moves. */
.pv-hero { overflow-x: clip; }
.pv-closing::before { background-position: center var(--closing-y, 100%); }

@media (prefers-reduced-motion: reduce) {
  .pv-word { opacity: 1; }
}
