/* Home · SB-P01a frames 6-14 (storyboards v3, approved 25 Nov 2026). Board px x2 = desktop px at 1920. */

/* ---------- frame 6: the problem (gold dot field, struck pills, the sentence turns Ivory, payoff) ---------- */
.problem { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 16vh var(--m); overflow: hidden; background: var(--ebony); }
.problem__dots { position: absolute; inset: 0; background: radial-gradient(rgba(212, 180, 124, .22) 1px, transparent 1.4px) 0 0 / 24px 24px;
  -webkit-mask: radial-gradient(75% 70% at 50% 50%, #000 35%, transparent 100%); mask: radial-gradient(75% 70% at 50% 50%, #000 35%, transparent 100%); }
.problem__in { position: relative; display: grid; justify-items: center; gap: calc(46 * var(--u)); max-width: calc(1300 * var(--u)); text-align: center; }
.problem__pills { display: flex; flex-wrap: wrap; justify-content: center; gap: max(10px, calc(14 * var(--u))); margin: 0; padding: 0; list-style: none; }
.problem__pill span { position: relative; }
.problem__pill span::after { content: ''; position: absolute; left: -6px; right: -6px; top: 55%; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: left center;
  transition: transform .4s var(--ease) calc(var(--i, 0) * .15s + .35s); }
.problem__pill.is-in span::after { transform: scaleX(1); }
.problem__p { margin: 0; font: 300 max(24px, calc(46 * var(--u)))/1.28 var(--f-display); letter-spacing: -.005em; color: var(--stone); }
.problem__b .w { color: var(--stone); transition: color var(--t-text) linear; }
.problem__b .w.is-lit { color: var(--ivory); }
.problem__pay { margin: 0; font: 400 max(30px, calc(64 * var(--u)))/1.1 var(--f-display); color: var(--ivory); }

/* ---------- frames 7-14: the five, packed live, on one pinned stage, then the shelf ---------- */
.five { position: relative; z-index: 1; height: 2020vh; }   /* 1920 vh pinned (home-five.js) + the stage itself */
.five__pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.five__hit { position: absolute; left: 24%; right: 18%; top: 13%; bottom: 25%; z-index: 2; cursor: grab; outline: none; border-radius: 12px; touch-action: pan-y; }
.five__hit.is-armed { touch-action: none; }
.five__hit.is-grabbing { cursor: grabbing; }
.five__hit:focus-visible { box-shadow: inset 0 0 0 1px rgba(212, 180, 124, .55); }
.five__rail { top: 50vh; }
.five__count { position: absolute; left: calc(36 * var(--u)); top: calc(50vh - 48px); }
.five__h2 { margin: 0; display: grid; font: 300 var(--fs-h2)/1.04 var(--f-display); letter-spacing: -.01em; color: var(--ivory); }
.five__h2 .d { color: var(--stone); }
.five__head, .five__shelf { position: absolute; z-index: 3; left: var(--m); top: calc(var(--nav-h) + var(--nav-top) + 5vh); }
.five__names { position: absolute; inset: 0; z-index: 3; margin: 0; padding: 0; list-style: none; pointer-events: none; }
.five__names li { visibility: hidden; position: absolute; left: 0; top: 0; padding-top: 12px; font: 400 max(15px, calc(20 * var(--u)))/1 var(--f-display); color: var(--ink-2); white-space: nowrap; will-change: transform; }
.five__shelfnames a { pointer-events: auto; display: inline-block; padding: 8px 4px; transition: color var(--t-hover) var(--ease); }
.five__shelfnames a:hover { color: var(--gold); }
.five__info { position: absolute; z-index: 3; left: var(--m); bottom: calc(7vh + 64px); max-width: 34vw; }
.five__name { margin: 12px 0 8px; font: 300 var(--fs-h1)/1 var(--f-display); letter-spacing: -.01em; color: var(--ivory); }
.five__spec { margin: 0; color: var(--ink-3); font-size: var(--fs-small); }
.five__tools { position: absolute; z-index: 3; right: var(--m); bottom: calc(7vh + 64px); display: grid; justify-items: end; gap: 14px; }
.five__chips .chip { cursor: pointer; }
.five__chips .chip:hover, .five__chips .chip:focus-visible { color: var(--ivory); box-shadow: inset 0 0 0 1px var(--gold); }
.five__scrub { display: flex; align-items: center; gap: 12px; font: 500 max(10px, calc(12 * var(--u)))/1 var(--f-ui); letter-spacing: .14em; color: var(--stone); text-transform: uppercase; }
.five__scrub input { -webkit-appearance: none; appearance: none; width: calc(260 * var(--u)); min-width: 150px; height: 28px; background: transparent; cursor: pointer; }
.five__scrub input::-webkit-slider-runnable-track { height: 1px; background: rgba(141, 132, 120, .55); }
.five__scrub input::-moz-range-track { height: 1px; background: rgba(141, 132, 120, .55); }
.five__scrub input::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(212, 180, 124, .18); }
.five__scrub input::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: var(--gold); }
.five__hint { margin: 0; font-size: max(11px, calc(12 * var(--u))); color: var(--stone); letter-spacing: .04em; }
.five__phases { position: absolute; z-index: 3; left: var(--m); right: var(--m); bottom: 7vh; display: grid; grid-template-columns: 15fr 45fr 15fr 15fr 10fr; gap: 6px; margin: 0; padding: 0; list-style: none; }
.five__phases i { position: relative; display: block; height: 2px; overflow: hidden; background: rgba(141, 132, 120, .28); }
.five__phases i::after { content: ''; position: absolute; inset: 0; background: var(--gold); transform: scaleX(var(--f, 0)); transform-origin: left center; }
.five__phases span { display: block; margin-top: 10px; font: 500 max(9px, calc(11 * var(--u)))/1.3 var(--f-ui); letter-spacing: .1em; color: var(--stone); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color var(--t-hover) var(--ease); }
.five__phases li.is-on span { color: var(--gold); }
.five__cta { position: absolute; z-index: 3; left: var(--m); bottom: 9vh; }
.five__shelfp { margin: 16px 0 0; max-width: 30em; color: var(--ink-3); }
.five__play, .five__done { min-height: 48px; }

/* which words show in which part of the story: row (frame 7), seq (frames 8-12), shelf (frame 14) */
.five__head, .five__row, .five__info, .five__tools, .five__phases, .five__shelf, .five__shelfnames, .five__cta, .five__count, .five__rail {
  opacity: 0; visibility: hidden; transform: translate3d(0, var(--reveal-y), 0);
  transition: opacity calc(var(--t-reveal) * .65) var(--ease-leave), transform calc(var(--t-reveal) * .65) var(--ease-leave), visibility 0s linear calc(var(--t-reveal) * .65); }
.five__rail { transform: rotate(180deg) translate3d(0, calc(var(--reveal-y) * -1), 0); }
[data-phase="row"] :is(.five__head, .five__row, .five__phases, .five__count),
[data-phase="seq"] :is(.five__info, .five__tools, .five__phases, .five__count),
[data-phase="shelf"] :is(.five__shelf, .five__shelfnames, .five__cta) {
  opacity: 1; visibility: visible; transform: none;   /* the new part waits until the old one has left: no words over words (B27) */
  transition: opacity var(--t-reveal) var(--ease) calc(var(--t-reveal) * .65), transform var(--t-reveal) var(--ease) calc(var(--t-reveal) * .65), visibility 0s calc(var(--t-reveal) * .65); }
[data-phase="row"] .five__rail, [data-phase="seq"] .five__rail { opacity: 1; visibility: visible; transform: rotate(180deg); transition: opacity var(--t-reveal) var(--ease), transform var(--t-reveal) var(--ease), visibility 0s; }
/* the box's name and size cross-fade when the next box takes the stage */
.five__info > * { transition: opacity .3s var(--ease); }
.five__info.is-swap > * { opacity: 0; transition: opacity .25s var(--ease-leave); }
.five__pin.is-playing .five__info, .five__pin.is-playing .five__phases { opacity: .35; }

/* phones and portrait screens: the model above the words, the chips in one row */
@media (max-width: 767px), (max-aspect-ratio: 23/20) {
  .five__hit { left: 4%; right: 4%; top: 13%; bottom: 46%; }
  .five__head, .five__shelf { top: calc(var(--nav-h) + var(--nav-top) + 16px); right: var(--m); }
  .five__h2 { font-size: 30px; }
  .five__info { left: var(--m); right: var(--m); max-width: none; bottom: calc(5vh + 206px); }
  .five__name { font-size: 34px; margin: 8px 0 6px; }
  .five__tools { left: var(--m); right: var(--m); bottom: calc(5vh + 40px); justify-items: start; gap: 10px; }
  .five__chips { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
  .five__chips .chip { min-height: 44px; }
  .five__hint, .five__scrub span { display: none; }
  .five__scrub input { width: 70vw; }
  .five__phases { left: var(--m); right: var(--m); bottom: 3vh; }
  .five__phases span { display: none; }
  .five__rail, .five__count { display: none; }
  .five__cta { left: var(--m); bottom: 6vh; }
  .five__names li { font-size: 13px; }
}

/* cursor ring while a box is held (frame 13): tightens to 16 px and fills gold, 300 ms */
.cursor.is-grab { width: 16px; height: 16px; margin: -8px 0 0 -8px; background: var(--gold); }
.cursor.is-grab b { opacity: 0; }
