/* How It Works (plan.md, "HOW IT WORKS"): the header's notifications, the six steps' timeline on the designed ground
   with the month's goal ring, the plan in glass over its photo, the walkthrough, the human tap and the close. */

/* ---------- top: the copy at the foot of the left side, the notifications stacking at the top, clear of his face ---------- */
.page-hiw .ph--a .ph__in { align-items: end; padding-bottom: var(--space-7); }
.page-hiw .ph--a .ph__media > img { object-position: 50% 22%; }
/* Andrew, 8 Nov: the cards stand clear of the headline at every width. The cards' left edge (--hiw-feed) is the
   headline's longest line ("the marketing.", 7.73 x its font size from the copy's left edge) plus a clear gap; the
   wyw feed hangs 26px left of its scene box. Their width fits between the headline and his face (its left edge at
   70% of the photo's width, kept about 2% + 16px clear), from 300px (all three cards still show) to 340px. Under
   1200px the photo is drawn 6% wider, its right edge cropped, so his face moves right and the cards fit beside it. */
.page-hiw .ph__scene {
  --hiw-feed: calc(max(0px, (100% - var(--max-w)) / 2) + var(--gutter) + 7.8 * var(--fs-h1) + 20px);
  left: calc(var(--hiw-feed) + 26px); top: 6%; width: clamp(300px, 68% - 16px - var(--hiw-feed), 340px); height: 236px;
}
.page-hiw .ph__scene .wy-feed small { text-wrap: balance; }
@media (min-width: 1100px) and (max-width: 1199px) {
  .page-hiw .ph--a .ph__media > img { width: calc(106% + 2px); }
}
@media (max-width: 1099px) {
  .page-hiw .ph--a .ph__in { padding-bottom: var(--space-6); }
  .page-hiw .ph--a .ph__media > img { object-position: 82% 30%; }
  .page-hiw .ph__scene { left: 10px; top: 10px; width: min(58%, 420px); height: calc(100% - 50px); }
}

/* ---------- steps: the timeline ---------- */
.page-hiw #steps { padding-block: var(--section-y) calc(var(--section-y) + var(--space-4)); }
.page-hiw #steps .ground__rings { right: -18%; top: 4%; }
.timeline { position: relative; max-width: 1080px; margin: var(--space-6) auto 0; padding-left: 88px; }
.timeline > .stop { top: -52px; right: 0; }
.timeline__track { position: absolute; left: 32px; top: 64px; bottom: 132px; width: 3px; border-radius: 3px; background: var(--c-line-night); }
.timeline__fill { width: 100%; height: calc(var(--p, 0) * 100%); border-radius: inherit; background: linear-gradient(180deg, var(--c-ring-a), var(--c-ring-b) 50%, var(--c-ring-c)); }
.tl-list { display: grid; gap: var(--space-5); margin: 0; padding: 0; list-style: none; }
.tl-chip { position: relative; display: inline-flex; align-items: center; gap: 8px; margin: 0 0 var(--space-4); padding: 8px 16px; border-radius: var(--radius-pill); font: 600 var(--fs-ui)/1 var(--font-ui); }
.tl-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.tl-chip--you { background: color-mix(in srgb, var(--c-accent) 18%, transparent); color: var(--c-accent-on-ink); }
.tl-chip--us { margin-top: var(--space-7); background: color-mix(in srgb, var(--c-sky) 18%, transparent); color: var(--c-brand-on-ink); }
.tl-item { position: relative; }
.tl-dot { position: absolute; left: -80px; top: 26px; display: grid; place-items: center; width: 49px; height: 49px; border-radius: 50%; background: var(--c-night); }
.tl-dot__ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring__track { fill: none; stroke: var(--c-line-night); stroke-width: 3; }
.ring__arc { fill: none; stroke-width: 4; stroke-linecap: round; stroke-dasharray: var(--arc, 0) 100; }
.tl-dot__ring .ring__arc { --arc: 0; transition: stroke-dasharray var(--dur-slow) var(--ease-out); }
.tl-item.is-reached .tl-dot__ring .ring__arc { --arc: 100; }
.tl-dot span { position: relative; font-family: var(--font-num); font-stretch: var(--stretch-num); font-weight: var(--fw-num); font-size: 17px; line-height: 1; color: var(--c-on-night-soft); transition: color var(--dur-med) var(--ease-out); }
.tl-item.is-reached .tl-dot span { color: var(--c-on-night); }
.tl-card { display: grid; grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr); gap: var(--space-5); align-items: center; padding: 24px 24px 24px 36px; border-radius: var(--radius-l); background: var(--c-paper); color: var(--c-ink); box-shadow: var(--shadow-l); }
.tl-card h3 { font-family: var(--font-display); font-stretch: 100%; font-weight: 800; font-size: clamp(22px, 1.2rem + 0.6vw, 28px); line-height: 1.15; color: var(--c-ink); }
.tl-card h3 small { display: block; margin-top: 6px; font: 600 var(--fs-small)/1.2 var(--font-ui); color: var(--c-accent-text); }
.tl-item--us .tl-card h3 small { color: var(--c-brand-text); }
.tl-card p { margin-top: var(--space-2); font-size: var(--fs-body); line-height: var(--lh-body); color: var(--c-ink-soft); }
.tl-card__scene { display: grid; place-items: center; min-height: 300px; padding: 18px; border-radius: var(--radius-m); background: var(--c-paper-alt); }
.tl-scene { width: 100%; max-width: 420px; }
.tl-scene[data-scene="leads"] { min-height: 280px; }
.tl-scene[data-scene="launch"], .tl-scene[data-scene="tune"] { min-height: 252px; }

/* the month's goal ring, closing as the visitor reaches the sixth step */
.tl-goal { position: relative; display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; justify-content: start; column-gap: var(--space-4); align-items: center; margin: var(--space-6) 0 0 -88px; padding: 18px 32px 18px 18px; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--c-paper) 6%, transparent); box-shadow: inset 0 0 0 1px var(--c-line-night); width: max-content; }
.tl-goal__ring { grid-row: 1 / 3; width: 84px; height: 84px; transform: rotate(-90deg); overflow: visible; }
.tl-goal__ring .ring__track { stroke-width: 4; }
.tl-goal__ring .ring__arc { stroke-width: 6; }
.tl-goal__n { margin: 0; font-family: var(--font-num); font-stretch: var(--stretch-num); font-weight: var(--fw-num); font-size: var(--fs-num-l); line-height: 1; color: var(--c-on-night); font-variant-numeric: tabular-nums; }
.tl-goal__t { margin: 4px 0 0; font: 600 var(--fs-ui)/1.2 var(--font-ui); color: var(--c-accent-on-ink); }

@media (max-width: 899px) {
  .timeline { padding-left: 56px; }
  .timeline__track { left: 18px; }
  .tl-dot { left: -58px; top: 18px; width: 40px; height: 40px; }
  .tl-dot span { font-size: 15px; }
  .tl-card { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); padding: 18px; }
  .tl-card__scene { min-height: 0; padding: 12px; }
  .tl-goal { margin-left: -56px; }
}
@media (max-width: 479px) {
  .timeline { padding-left: 44px; }
  .timeline__track { left: 13px; }
  .tl-dot { left: -46px; width: 32px; height: 32px; }
  .tl-dot span { font-size: 13px; }
  .tl-card { padding: 14px; }
  .tl-card__scene { padding: 0; background: none; }
  .tl-goal { margin-left: -44px; }
}

/* ---------- inside: the plan in glass over the owner reading it ---------- */
.inside__in { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--space-6); align-items: center; }
.inside__copy h2 { font-size: var(--fs-h2); max-width: 14ch; }
.inside__shot { aspect-ratio: 4 / 3.1; --focus: 70% 40%; }
.inside__shot::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, color-mix(in srgb, var(--c-night-2) 46%, transparent) 0%, transparent 55%); }
.inside__scene { left: 4%; bottom: 5%; width: min(64%, 440px); }
@media (max-width: 999px) {
  .inside__in { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
  .inside__shot { aspect-ratio: 4 / 4.4; --focus: 74% 30%; }
  .inside__scene { left: 3%; bottom: 3%; width: min(78%, 420px); }
}
/* on the phone the plan card is taller than the old frame: the photo grows tall behind it, his face in the open top,
   the card whole on the photo below it */
@media (max-width: 699px) {
  .inside__shot { aspect-ratio: auto; display: block; padding: 330px 12px 12px; }
  .inside__shot > .inside__scene { position: relative; left: auto; bottom: auto; width: 100%; }
}

/* ---------- walkthrough: the explainer, large ---------- */
.walk__frame { position: relative; max-width: 1000px; margin: 0 auto; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius-xl); background: var(--c-night); box-shadow: var(--shadow-l); }
.walk__frame > img, .walk__frame > picture > img, .walk__frame > iframe { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; border: 0; }
.walk__frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(0deg, color-mix(in srgb, var(--c-night) 55%, transparent) 0%, transparent 45%); }
.walk__frame.is-playing::after { display: none; }
.walk__play { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: var(--space-3); border: 0; background: none; color: var(--c-on-night); cursor: pointer; }
.walk__play .play { width: 88px; height: 88px; transition: transform var(--dur-fast) var(--ease-out); }
.walk__play:hover .play { transform: scale(1.06); }
.walk__play:focus-visible { outline: none; }
.walk__play:focus-visible .play { box-shadow: var(--ring-focus); }
.walk__label { padding: 8px 16px; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--c-night) 62%, transparent); font: 600 var(--fs-ui)/1 var(--font-ui); }

/* ---------- human: the owner taps Talk with a human ---------- */
/* the heading at the top left over the photo's open side, the dashboard card under it, the two faces at the right */
.human { height: clamp(700px, 54vw, 800px); --focus: 70% 35%; }
.human::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, color-mix(in srgb, var(--c-night-2) 84%, transparent) 0%, color-mix(in srgb, var(--c-night-2) 52%, transparent) 30%, transparent 50%); }
.human__in { position: relative; z-index: 4; padding-top: clamp(48px, 5vw, 72px); color: var(--c-on-night); }
.human__in h2 { font-size: var(--fs-h2); color: var(--c-on-night); max-width: 13ch; }
.human__in .head__line { max-width: 34ch; color: var(--c-on-night); text-shadow: 0 1px 3px color-mix(in srgb, var(--c-night) 55%, transparent); }
.human__scene { left: max(var(--gutter), calc((100% - var(--max-w)) / 2 + var(--gutter))); bottom: 40px; width: 400px; height: 440px; }
@media (max-width: 899px) {
  /* a night band: the heading, then a tall photo with the faces in its upper half and the card at its foot */
  .human { display: grid; height: auto; border-radius: 0; background: var(--c-night-2); --focus: 56% 18%; }
  .human::after { top: auto; height: 56%; background: linear-gradient(0deg, color-mix(in srgb, var(--c-night-2) 70%, transparent) 0%, transparent 100%); }
  .human > img, .human > picture > img { position: relative; inset: auto; grid-row: 2; grid-column: 1; width: 100%; height: 860px; object-fit: cover; }
  .human__in { grid-row: 1; padding-block: var(--section-y) var(--space-5); }
  .human__scene { left: 50%; bottom: 14px; translate: -50% 0; width: min(360px, calc(100% - 28px)); height: 400px; }
  .human > .stop { position: relative; grid-row: 2; grid-column: 1; justify-self: end; align-self: end; top: auto; right: auto; margin: 0 12px 426px 0; }
}

/* ---------- close: the tech and the homeowner above, the words at the foot ---------- */
.page-hiw .close-band { --focus: 35% 20%; }
