/* Screen 2, one morning. */
/* The morning ends where the Dictation headline's band would begin, but on a desktop that band
   rises into the morning's foot (sections/dictation.css: up to 275 px), so the headline stands
   about 150 px under "Hold to talk", beside the resting disc. The stage column keeps its own
   length, so the sticky stage comes to rest exactly where the no-JS stage stands: one whole
   disc, never cut by a straight line, the headline beside its lower left and the spoken card's
   high right corner under its foot. The 490 px term keeps the follow-up card's foot 96 px or
   more above the morning's foot: its words are px-sized, so the card is about 390 to 400 px
   tall at every width (measured 1024 to 1920).
   --dot: the voice at full size, the hero's full stop (0.2 em of its 150 px headline). */
.morning { height: max(calc(1808 * var(--u)), calc(1340 * var(--u) + 490px)); --dot: calc(30 * var(--u)); }
/* The title stands across the page's centre, in the room between the dial and the stage, off
   the hero's copy column and every other strong vertical: "Your morning." (6.27 em) is centred
   on the window, and "Your call." steps in 1.45 em under it (128 at 1440). The 450 floor keeps
   the first line 88 px or more clear of the hero speaker's ground line from 1024 to 1440. */
.morning h2 { position: relative; z-index: 2; padding-top: calc(120 * var(--u)); padding-left: max(calc(50% - 3.14em), calc(450 * var(--u))); }
.mh { display: block; }
.mh-2 { margin-left: 1.45em; }
.dial { position: absolute; width: calc(460 * var(--u)); height: calc(1700 * var(--u)); overflow: visible; left: calc(-20 * var(--u)); top: calc(-1.5px - 10 * var(--u)); z-index: 1; }
.dial .dial-line { vector-effect: non-scaling-stroke; }
.node .n-ring, .node .n-hole { opacity: 0; }
.node.is-now .n-ring { opacity: 1; }
.node.is-now .n-dot { transform: scale(0.786); }
.node.is-next .n-hole { opacity: 1; }
/* The still dot: a plain dot at full size on the last node (while the travelling dot is off, js/morning.js moves it to the beat's). */
.dial-mark { position: absolute; left: calc(var(--x) * var(--u) - var(--dot) / 2); top: calc(var(--y) * var(--u) - 1.5px - var(--dot) / 2); width: var(--dot); height: var(--dot); border-radius: 50%; background: var(--orange); z-index: 2; }

.beats { list-style: none; }
.beat { position: absolute; z-index: 2; left: calc(var(--x) * var(--u)); top: calc(var(--y) * var(--u) - 12px); width: calc(var(--w) * var(--u)); }
.beat-time { display: block; font-size: var(--fs-label); line-height: 22px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); font-variant-numeric: tabular-nums; }
.beat-h { margin-top: 6px; font-size: var(--fs-beat); line-height: 1.16; letter-spacing: -0.02em; font-weight: 700; color: var(--ink); }
/* The beat being played steps up, scaled with the drawing (44 at 1440), so its title keeps to one line in its column at every width. */
.beat.is-now .beat-h { font-size: calc(44 * var(--u)); line-height: 1.06; letter-spacing: -0.03em; font-weight: 800; }
.beat-line { margin-top: 10px; max-width: 24em; font-size: var(--fs-body); line-height: 1.5; color: var(--body); text-wrap: balance; }
.motion .beat:not(.is-now) .beat-h { color: var(--body); }
.motion .beat:not(.is-now) .beat-line { color: var(--muted); }
.pnode, .pupnext, .pcall, .pnote, .psaid { display: none; }

/* The column runs from 400 down to the disc's foot at rest: (1200 - 530 + 760) design px, less
   the 12 px the beats' time line sits up, so its foot is the disc's foot with and without JS.
   It ends 140 short of Before lunch's beat, so the disc rests high enough for the risen
   Dictation scene: the spoken card's high right corner keeps under the disc's foot. */
.stage-col { position: absolute; top: calc(400 * var(--u)); bottom: auto; height: calc(1430 * var(--u) - 12px); right: 0; width: calc(620 * var(--u)); overflow: clip; z-index: 1; }
.stage { position: sticky; top: calc(50vh - 380 * var(--u)); height: calc(760 * var(--u)); }
/* Without JavaScript the stage holds its last moment, the follow-up, at the column's foot,
   where the sticky stage comes to rest: the card's top (130 into the stage) stands 140 above
   Before lunch's time line, beside 10:45's beat. */
html:not(.js) .stage { position: absolute; left: 0; right: 0; top: auto; bottom: 0; }
.disc { position: absolute; left: 0; top: 0; width: calc(760 * var(--u)); height: calc(760 * var(--u)); border-radius: 50%; background: var(--lilac); }
/* The card keeps 32 px or more clear of the window's right edge. */
.moments { position: absolute; left: calc(40 * var(--u)); top: 0; bottom: 0; width: min(clamp(400px, calc(520 * var(--u)), 520px), calc(100% - 40 * var(--u) - 32px)); display: grid; align-items: start; padding-top: calc(130 * var(--u)); }
.paper { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 40px 44px 42px; }
.moment { grid-area: 1 / 1; opacity: 0; visibility: hidden; }
.moment.is-on { opacity: 1; visibility: visible; }

/* The stage's words, at reading size: title 34, lines 19 to 23. */
.sp-title { font-size: clamp(28px, calc(34 * var(--u)), 34px); line-height: 1.1; font-weight: 800; letter-spacing: -0.025em; color: var(--ink); }
.sp-meta { margin-top: 8px; font-size: 15px; color: var(--muted); }
/* 10:45: the note's meta line holds the app's small blue Make it on its right; what the
   press makes (.sp-sum) follows under the rule. */
/* The row and the rule under it give back what the button adds, so the note stands
   as tall as it did and keeps inside the disc on a 1024 window. */
.sp-make { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-top: 6px; }
.sp-make .sp-meta { margin-top: 0; }
.drawn-btn.btn-make { height: 32px; padding: 0 15px; border-radius: 10px; font-size: 14px; }
.sp-sum > .sp-rule { margin: 19px 0 18px; }
.sp-rule { height: 1px; background: var(--line); margin: 24px 0 22px; }
.sp-eyebrow { font-size: 12px; line-height: 1.2; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.sp-decision { margin: 10px 0 26px; font-size: clamp(19px, calc(23 * var(--u)), 23px); line-height: 1.32; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.sp-steps { list-style: none; margin-top: 6px; }
.sp-steps li { display: flex; gap: 14px; align-items: flex-start; margin-top: 12px; font-size: clamp(17px, calc(19 * var(--u)), 19px); line-height: 1.42; color: var(--body); }
.ringmark { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 3px; }
.m-upnext .sp-title, .pupnext .sp-title { margin-top: 12px; }
/* 09:55: the invitees' heads, side by side. */
.sp-people { display: flex; gap: 2px; margin-top: 20px; }
.sp-people .head { width: 34px; height: 38px; }
.sp-join { margin-top: 26px; }
.drawn-btn { display: inline-flex; align-items: center; height: 46px; padding: 0 22px; border-radius: 12px; background: var(--blue); color: var(--cream); font-size: 16px; font-weight: 700; }

/* 10:00: the live card, one row per voice, and the call under it. */
.live { padding: 32px 40px 30px; }
.sp-hearing { display: flex; align-items: baseline; gap: 10px; margin-top: 10px; font-size: 15px; line-height: 1.4; color: var(--body); }
.rec { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: var(--sky); }
.sp-talk { display: grid; gap: 10px; margin-top: 22px; }
.talk-row { display: flex; align-items: center; gap: 10px; }
.talk-row .head { flex: 0 0 auto; width: 22px; height: 25px; margin-right: 4px; }
.tw { display: flex; gap: 3px; }
.tw i { width: 6px; height: 6px; border-radius: 50%; background: var(--sky); }
.call-scene { width: 100%; height: auto; overflow: visible; }

.sp-field { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 16px; color: var(--ink); }
.sp-k { width: 72px; color: var(--muted); font-size: 14px; }
.chip { padding: 3px 10px; border-radius: 999px; background: var(--haze); font-size: 14px; font-weight: 600; color: var(--plum); }
.sp-said { margin: 22px 0 22px; padding: 16px 18px; border-radius: 12px; background: var(--haze); font-size: clamp(17px, calc(20 * var(--u)), 20px); line-height: 1.45; font-weight: 600; color: var(--ink); }
.sp-quiet { color: var(--muted); font-size: 15px; }
p.sp-quiet { margin-top: 6px; }

@media (max-width: 1023.98px) {
  /* A straight dial at x 28, the reminder, the call, the note and the follow-up inline. */
  .morning { height: auto; padding: 72px 0 0; --dot: 13px; }
  /* The title steps in off the hero's left line, as far as the phone's width allows. */
  .morning h2 { padding: 0 var(--m) 0 calc(var(--m) + clamp(0px, 100vw - 334px, 52px)); }
  .mh-2 { margin-left: 46px; }
  .dial, .stage-col, .dial-mark { display: none; }
  .beats { position: relative; margin: 40px var(--m) 0; padding-left: 40px; }
  .beat { position: relative; left: auto; top: auto; width: auto; padding-bottom: 34px; }
  .beat::before { content: ""; position: absolute; left: -29px; top: 10px; bottom: -12px; width: 2px; background: var(--ink); }
  .beat.last::before { bottom: auto; height: 34px; }
  /* The progress, heavier in ink (in the final frame, the whole morning, as the desktop dial draws it). */
  .beat.is-done::before, .beat.is-now::before, :root:not(.motion) .beat::before { left: -30.5px; width: 5px; border-radius: 3px; }
  .pnode { display: block; position: absolute; left: -35px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); z-index: 1; }
  /* The beat the voice is at (in the final frame, the last) rings its node, and the dot sits in it at full size. */
  .beat.is-now .pnode, :root:not(.motion) .beat.last .pnode { left: -40px; top: -1px; width: 24px; height: 24px; background: var(--cream); border: 2px solid var(--ink); }
  .beat.is-now .pnode::after, :root:not(.motion) .beat.last .pnode::after { content: ""; position: absolute; left: 50%; top: 50%; width: var(--dot); height: var(--dot); margin: calc(var(--dot) / -2) 0 0 calc(var(--dot) / -2); border-radius: 50%; background: var(--orange); }
  .beat.is-next .pnode { background: var(--cream); border: 2px solid var(--ink); }
  .beat-time { font-size: 12px; }
  .beat-h { font-size: var(--fs-beat); }
  .beat.is-now .beat-h { font-size: var(--fs-statement); }
  .beat-line { margin-top: 6px; }
  .pcall { display: block; position: relative; z-index: 2; margin: 22px 0 4px -40px; }
  .pcall .live { border-radius: 20px; padding: 24px 22px 22px; }
  .pcall .sp-title { font-size: 24px; }
  .pcall .sp-hearing { font-size: 14px; }
  .pcall .sp-talk { margin-top: 18px; gap: 8px; }
  /* The drawing keeps to the beat's column, clear of the timeline. */
  .pcall .call-scene { width: calc(100% - 40px); max-width: 420px; margin-left: 40px; }
  .pupnext, .pnote { display: block; position: relative; z-index: 2; margin: 24px 0 4px -40px; }
  .paper-p { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 28px 22px 26px; }
  .paper-p .sp-title { font-size: 26px; }
  .paper-p .sp-decision { font-size: 19px; margin-bottom: 20px; }
  .paper-p .sp-steps li { font-size: 16px; gap: 10px; }
  .paper-p .ringmark { width: 18px; height: 18px; }
  .psaid { position: relative; display: block; margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: var(--haze); font-size: 17px; line-height: 1.45; font-weight: 600; color: var(--ink); }
}

/* ---------------------------------------------------------------- motion */
/* One page fades out before the next fades in, so two pages never overlap. */
.motion .moment { transition: opacity 0.12s ease, visibility 0s linear 0.12s; }
.motion .moment.is-on { transition: opacity 0.18s ease 0.12s, visibility 0s; }
.drawn-btn { transition: transform 0.12s ease, background-color 0.12s ease; }
.drawn-btn.is-pressed { transform: scale(0.97); }
/* Make it gives a little more as it is pressed, so the one press reads at a glance. */
.drawn-btn.btn-make.is-pressed { transform: scale(0.92); background: var(--navy); }
/* 10:45: before Make it is pressed the summary's rule and the next steps' rings wait too;
   they come in with the first words. */
.sp-sum .sp-rule, .sp-sum .ringmark { transition: opacity 0.2s ease; }
.motion .sp-sum.is-unmade .sp-rule, .motion .sp-sum.is-unmade .ringmark { opacity: 0; transition: none; }
/* 10:00: each voice takes its turn: its dots rise from the head, then land in its row as words. */
.call-dots circle { transform-box: fill-box; transform-origin: center; }
.motion .call .call-dots circle, .motion .call .tw i { opacity: 0; transform: scale(0.4); }
.motion .is-played > .call .call-dots circle, .motion .is-played > .call .tw i { opacity: 1; transform: none; transition: opacity 0.2s, transform 0.2s; }
.motion .is-played > .call .call-dots circle { transition-delay: calc(var(--t) * 0.55s + var(--k) * 70ms); }
.motion .is-played > .call .tw i { transition-delay: calc(var(--t) * 0.55s + 0.3s + var(--j) * 30ms); }
.m-draft .sp-to, .m-draft .sp-subj { transition: transform 0.2s ease-out, opacity 0.2s ease-out; }
.motion .m-draft.is-pre .sp-to, .motion .m-draft.is-pre .sp-subj { opacity: 0; transform: translateX(-12px); }
/* The phone's 17 px follow-up waits at 65% ink on Haze (5.1:1). */
.motion .psaid.is-waiting .w { opacity: 0.65; }
.dial-progress { transition: none; }
/* The still dot comes alive once as it reaches a beat (on the phone, inside its node's ring). */
.motion .dial-mark.is-swelling, .motion .beat.is-now .pnode::after { animation: m-swell 0.42s ease-out; }
@keyframes m-swell { 40% { transform: scale(1.16); } }
