/* how-it-works.css: the How it works page (design\components.md; the tokens of system.css only). The climb: six steps beside
   one red arrow pinned at their side. Parts: hero, yours, ours, inside, team, faq, close. */

/* =================== hero: centered words over a full-bleed clip, the chat at the left, the notifications at the right =================== */
.phead--over { position: relative; isolation: isolate; overflow: hidden; overflow: clip; min-height: min(100svh, 900px); display: grid; align-items: center; background: var(--c-ink); }
.phead__stop { bottom: 22px; right: 22px; }
.phead--over .phead__media { z-index: -2; }
.phead--over .phead__media video { inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; filter: saturate(1.1); }
.phead--over .phead__shade { position: absolute; inset: 0; z-index: -1; background: radial-gradient(44% 58% at 50% 50%, color-mix(in srgb, var(--c-ink) 74%, transparent), color-mix(in srgb, var(--c-ink) 22%, transparent) 100%), linear-gradient(180deg, color-mix(in srgb, var(--c-ink) 66%, transparent) 0%, transparent 24%, transparent 78%, var(--c-ink) 100%); }
.phead--over .phead__in { display: grid; grid-template-columns: 290px minmax(0, 1fr) 340px; gap: 24px; align-items: center; padding-block: 150px 70px; }
.phead--over .phead__copy { display: grid; justify-items: center; text-align: center; }
.phead--over .display { font-size: clamp(38px, 4.2vw, 62px); }
.phead--over .display .gold { display: block; }
.phead--over .phead__lead { margin: 20px auto 30px; text-align: center; }
.phead--over .phead__chat { width: 290px; overflow: visible; }
.phead--over .phead__wyw { height: 300px; }
/* all four notifications on the computer: the column is narrower than its scene's own wide layout */
.phead--over .phead__wyw .wy-feed { bottom: 0; }
.phead--over .phead__wyw .wy-feed li:nth-child(n+3) { display: flex; }
@media (max-width: 1180px) {
  .phead--over { display: block; min-height: 0; }
  .phead--over .phead__in { grid-template-columns: 290px minmax(0, 340px); justify-content: center; padding-block: 124px 56px; gap: 34px 28px; }
  .phead--over .phead__copy { grid-column: 1 / -1; grid-row: 1; }
  .phead--over .phead__left, .phead--over .phead__right { grid-row: 2; }
  .phead--over .phead__shade { background: linear-gradient(180deg, color-mix(in srgb, var(--c-ink) 74%, transparent) 0%, color-mix(in srgb, var(--c-ink) 44%, transparent) 50%, var(--c-ink) 100%); }
  .phead__stop { bottom: auto; top: 86px; right: 14px; }
}
@media (max-width: 760px) {
  /* one column, and the picture behind the words and the chat only: a clip drawn no wider than its file */
  .phead--over .phead__in { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .phead--over .phead__right { width: min(100%, 460px); }
  .phead--over .phead__wyw .wy-feed li:nth-child(n+3) { display: none; }
  .phead--over .phead__wyw { height: 150px; }
  .phead--over .phead__media { bottom: auto; height: 740px; }
  .phead--over .phead__shade { background: linear-gradient(180deg, color-mix(in srgb, var(--c-ink) 70%, transparent) 0, color-mix(in srgb, var(--c-ink) 52%, transparent) 360px, var(--c-ink) 740px); }
}

/* =================== the climb: the rail pinned beside the steps =================== */
.climb { position: relative; overflow: clip; background: radial-gradient(60% 34% at 92% 6%, color-mix(in srgb, var(--c-brand-light) 30%, transparent), transparent 72%), radial-gradient(50% 30% at 2% 24%, color-mix(in srgb, var(--c-red) 20%, transparent), transparent 72%), radial-gradient(40% 18% at 80% 40%, color-mix(in srgb, var(--c-accent) 9%, transparent), transparent 72%), linear-gradient(180deg, var(--c-night) 0%, var(--c-ink) 52%, var(--c-ink) 100%); }
.climb__field { position: absolute; left: -12vw; top: 40px; width: 92vw; opacity: .04; pointer-events: none; }
.climb__in { position: relative; display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); padding-block: clamp(70px, 7vw, 100px); }
.climb__rail { position: sticky; top: 96px; align-self: start; height: calc(100svh - 130px); max-height: 760px; }
.rail { position: relative; height: 100%; }
.rail__end { position: absolute; right: 0; top: 0; margin: 0; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--c-on-ink) 10%, transparent); color: var(--c-soft-on-ink); font: 850 15.5px/1.05 var(--font-display); font-stretch: var(--wide-ui); white-space: nowrap; transition: background-color var(--dur-med) linear, color var(--dur-med) linear; }
.rail[data-landed] .rail__end { background: var(--c-accent); color: var(--c-on-gold); }
.rail__svg { position: absolute; left: 0; top: 44px; width: 100%; height: calc(100% - 44px); overflow: visible; }
.rail__track, .rail__line, .rail__fold { fill: none; stroke-width: 20px; stroke-linejoin: miter; stroke-miterlimit: 6; }
.rail__track { stroke: color-mix(in srgb, var(--c-red) 16%, transparent); }
.rail__line { stroke-dasharray: 100 200; stroke-dashoffset: 100; }
.rail__fold { stroke: #000; opacity: .2; stroke-dasharray: 1 2; stroke-dashoffset: 1; }
.rail__head { fill: var(--c-red-hot); }
.rail[data-landed] .rail__head { fill: var(--c-accent); }
.rail__num { position: absolute; transform: translate(-50%, -50%); font: 900 19px/1 var(--font-display); font-stretch: var(--wide); color: color-mix(in srgb, var(--c-on-ink) 56%, transparent); transition: color var(--dur-med) linear; }
.rail__num[data-on] { color: var(--c-accent); }
.climb__mini { display: none; }
.climb__steps { display: grid; gap: clamp(70px, 7vw, 110px); min-width: 0; }
.yours, .ours { position: relative; display: grid; gap: clamp(28px, 3vw, 44px); min-width: 0; }
.climb .sec-head { margin-bottom: 0; }

/* the owner's steps: words at the left, the scene large at the right */
.cstep { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(20px, 3vw, 44px); align-items: center; min-height: 330px; }
.cstep__title { display: flex; align-items: baseline; gap: 10px; font-size: clamp(22px, 1.9vw, 28px); }
.cstep__num { flex: none; font: 900 1em/1 var(--font-display); font-stretch: var(--wide); color: var(--c-accent); }
.cstep__time { display: inline-block; margin: 10px 0 0; padding: 5px 10px; border-radius: 8px; background: color-mix(in srgb, var(--c-accent) 16%, transparent); color: var(--c-accent); font: 750 14.5px/1.1 var(--font-display); font-stretch: var(--wide-ui); }
.cstep__line { margin: 12px 0 0; color: var(--c-soft-on-ink); font-size: clamp(16px, 1.2vw, 18px); line-height: 1.5; }
.cstep__stage { position: relative; display: grid; justify-items: end; align-items: center; min-width: 0; }
.cstep__stop { top: -14px; right: -14px; }
.cstep__scene { width: min(100%, 420px); min-height: 300px; zoom: 1.2; }
/* the chat grows as it plays: its box keeps its tallest height, so the words under it stay still */
.cstep__stage [data-scene="goal"] { min-height: 240px; }
.cstep__scene--wide { width: min(100%, 520px); min-height: 330px; zoom: 1.1; }

/* our steps: a framed photo, the words and the scene together on its side clear of the faces, sides alternating */
.cframe { position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: 560px; padding: clamp(18px, 2.2vw, 30px); border-radius: var(--radius-l); overflow: hidden; background: var(--c-night); box-shadow: var(--shadow-l); }
.cframe__stop { top: 14px; right: 14px; }
.cframe--left .cframe__stop { right: auto; left: 14px; }
.cframe__media { z-index: -2; }
.cframe__media img { inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; }
.cframe__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(270deg, color-mix(in srgb, var(--c-ink) 92%, transparent) 0%, color-mix(in srgb, var(--c-ink) 74%, transparent) 42%, transparent 62%); }
.cframe__col { grid-column: 2; display: grid; align-content: center; gap: 16px; min-width: 0; }
.cframe__text { min-width: 0; }
.cframe__scene { width: min(100%, 420px); min-height: 280px; justify-self: start; }
.cframe--left .cframe__col { grid-column: 1; }
.cframe--left .cframe__shade { background: linear-gradient(90deg, color-mix(in srgb, var(--c-ink) 92%, transparent) 0%, color-mix(in srgb, var(--c-ink) 74%, transparent) 42%, transparent 62%); }
.cframe--launch .cframe__media { --pos: 26% 40%; }
.cframe--leads .cframe__media { --pos: 90% 40%; }
.cframe--leads .cframe__scene { zoom: 1.12; }
/* mirrored, so its clear side is at the right and the sides alternate */
.cframe--tune .cframe__media { --pos: 100% 30%; }
.cframe--tune .cframe__media img { transform: scaleX(-1); }
/* on the dark card the falling line is gold, so it reads at a glance */
.cframe--tune [data-scene="tune"] .tn-line { stroke: var(--c-accent); }
.cframe--tune [data-scene="tune"] .tn-head { fill: var(--c-accent); }

/* =================== inside: the plan, on the designed ground =================== */
.inside { background: radial-gradient(60% 70% at 88% 50%, color-mix(in srgb, var(--c-brand-light) 34%, transparent), transparent 72%), radial-gradient(44% 60% at 0% 100%, color-mix(in srgb, var(--c-red) 20%, transparent), transparent 72%), var(--c-night); overflow: hidden; overflow: clip; }
.inside__field { position: absolute; right: -10vw; bottom: -8vw; width: 70vw; opacity: .07; pointer-events: none; }
.inside__in { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(30px, 5vw, 70px); align-items: center; }
.inside__copy .sec-head { margin-bottom: 28px; }
.inside__stage { position: relative; }
.inside__stop { top: -14px; right: -14px; }
.inside__scene { height: clamp(540px, 44vw, 620px); }

/* =================== team: a framed photo, the words and the scene =================== */
.team { background: var(--c-ink); padding-bottom: clamp(50px, 5vw, 76px); }
.team__frame { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); gap: 24px; align-items: end; min-height: 660px; padding: clamp(18px, 2.4vw, 34px); border-radius: var(--radius-l); overflow: hidden; background: var(--c-night); box-shadow: var(--shadow-l); }
.team__stop { top: 18px; right: calc(470px + clamp(18px, 2.4vw, 34px) + 16px); }
.team__media { z-index: -2; right: 30%; --pos: 50% 26%; }
.team__media img { inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; }
.team__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, color-mix(in srgb, var(--c-ink) 92%, transparent) 0%, color-mix(in srgb, var(--c-ink) 60%, transparent) 26%, transparent 46%), linear-gradient(270deg, var(--c-night) 30%, transparent 56%); }
.team__copy { align-self: end; max-width: 620px; }
.team__copy .sec-line { margin-bottom: 4px; }
.team__frame .team__scene { justify-self: end; width: 100%; max-width: 470px; align-self: center; overflow: visible; }

/* =================== close =================== */
.hiw-close .band__media { --pos: 50% 40%; }
.hiw-close .pclose__card { left: max(24px, calc(50% - 620px)); bottom: clamp(52px, 8vw, 110px); }

/* =================== narrower =================== */
@media (max-width: 1080px) {
  .climb__in { grid-template-columns: 124px minmax(0, 1fr); gap: 18px; }
  .rail__track, .rail__line, .rail__fold { stroke-width: 14px; }
  .rail__num { font-size: 16px; }
  .rail__end { font-size: 13.5px; padding: 7px 8px; }
  .cstep { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .cstep__stage { justify-items: start; }
  .cstep__stop { right: 0; }
  .cstep__scene, .cstep__scene--wide { zoom: 1; }
  .inside__in { grid-template-columns: minmax(0, 1fr); }
  /* the head on ink above, the photo below it with the card standing over its foot: the face above the card */
  .team__frame { grid-template-columns: minmax(0, 1fr); gap: 0; min-height: 0; padding: 0; overflow: visible; border-radius: 0; background: none; box-shadow: none; }
  .team__copy { grid-row: 1; max-width: none; margin-bottom: 24px; }
  .team__media { position: relative; inset: auto; right: auto; grid-row: 2; grid-column: 1; z-index: 0; align-self: stretch; border-radius: var(--radius-l); overflow: hidden; --pos: 50% 0%; }
  .team__shade { display: none; }
  .team__frame .team__scene { grid-row: 2; grid-column: 1; z-index: 1; justify-self: center; width: min(100% - 28px, 470px); margin: 330px 0 14px; }
  .team__stop { position: relative; inset: auto; grid-row: 2; grid-column: 1; z-index: 2; justify-self: end; align-self: start; margin: 276px 12px 0 0; }
}
@media (max-width: 760px) {
  .climb__in { display: block; padding-top: 0; }
  .climb__rail { display: none; }
  .climb__mini { position: sticky; top: 60px; z-index: 20; display: flex; align-items: center; gap: 10px; margin: 0 calc(-1 * var(--gutter)) 24px; padding: 10px var(--gutter); background: color-mix(in srgb, var(--c-ink) 94%, transparent); box-shadow: inset 0 -1px 0 var(--c-line-on-ink); color: var(--c-on-ink); font: 750 15px/1 var(--font-display); font-stretch: var(--wide-ui); }
  .climb__mini svg { flex: none; width: 24px; height: 24px; color: var(--c-red); }
  .climb__mini b { color: var(--c-accent); font-weight: 900; }
  .climb__bar { flex: 1; display: block; height: 6px; border-radius: 6px; background: color-mix(in srgb, var(--c-on-ink) 14%, transparent); overflow: hidden; }
  .climb__bar i { display: block; height: 100%; width: 100%; background: var(--c-red); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
  .cstep__stage { justify-items: stretch; }
  .cstep__stop { top: -44px; right: 0; }
  .cstep__scene, .cstep__scene--wide { width: 100%; }
  /* the photo stands behind its scene in one grid cell, drawn taller and lifted: the faces above the words */
  .cframe { grid-template-columns: minmax(0, 1fr); min-height: 0; padding: 0; }
  .cframe__stop, .cframe--left .cframe__stop { top: 222px; right: 12px; left: auto; }
  .cframe__media { position: relative; inset: auto; grid-row: 1; grid-column: 1; z-index: -2; }
  .cframe__col, .cframe--left .cframe__col { grid-row: 1; grid-column: 1; margin: 268px 12px 12px; }
  .cframe__shade, .cframe--left .cframe__shade { background: linear-gradient(180deg, transparent 180px, color-mix(in srgb, var(--c-ink) 84%, transparent) 280px, color-mix(in srgb, var(--c-ink) 92%, transparent) 100%); }
  .cframe__scene { width: 100%; }
  .cframe--launch .cframe__media { --pos: 26% 0%; }
  .cframe--launch .cframe__media img { height: 108%; top: -12%; }
  .cframe--leads .cframe__media { --pos: 73% 0%; }
  .cframe--leads .cframe__media img { height: 110%; top: -14%; }
  .cframe--tune .cframe__media { --pos: 72% 0%; }
  .inside__scene { height: 700px; }
  .inside__stop { top: -24px; right: -6px; }
  .team__frame .team__scene { margin-top: 290px; }
  .team__stop { margin-top: 236px; }
  /* the clip only over the upper part, so the hand and the page stay readable, not one big blur */
  .hiw-close .band__media { bottom: 34%; -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent); mask-image: linear-gradient(180deg, #000 72%, transparent); }
  .hiw-close .pclose__card { position: relative; left: auto; bottom: auto; margin: 0 auto 22px; }
  .hiw-close { display: flex; flex-direction: column; align-items: center; }
  .pclose.hiw-close { padding-top: 64vw; padding-bottom: 96px; }
}
