/* Stock (agent A, round 4): round 2's full composition for Noor: her two-storey home (storeroom upstairs,
   packing room downstairs, 3D stairs), her warehouse across town, and the road between them. One movement:
   a van brings ten denim jackets from the warehouse to the packing room; only that road is lit. */
.stock { --mark: #FAD7A0; }
.stock .st-sky { background: linear-gradient(180deg, #EEF3E6 0%, #F5EFDC 55%, #FAEBCC 100%); }
.stock .st-view { position: absolute; inset: 0; pointer-events: none; }
.stock .st-scene { position: absolute; left: 0; top: 0; width: 1440px; height: 900px; transform-origin: 720px 0; }
.stock[dir="rtl"] .st-scene { transform: scaleX(-1); }
.stock .st-house { position: absolute; left: 0; top: 0; overflow: visible; }
.stock .st-noor { position: absolute; z-index: 2; }
.stock .st-noor > svg { display: block; overflow: visible; }
.stock .kc .pr-bag, .stock .kc .fing { opacity: 0 !important; }

/* the van: one movement along the road, from the warehouse dock to the packing room door */
.stock .st-van { position: absolute; left: 0; top: 0; z-index: 3; width: 100px; height: 58px; opacity: 0;
  offset-path: path('M972 326 C 1010 420, 1016 560, 972 650 S 852 790, 796 800'); offset-rotate: 0deg; offset-anchor: 50px 52px; offset-distance: 0%;
  transition: opacity .4s ease; }
.stock .st-van > svg { display: block; transform: scaleX(-1); }
.stock .st-van.at-dock, .stock .st-van.driving, .stock .st-van.parked { opacity: 1; }
.stock .st-van.driving { animation: st-drive 2.8s cubic-bezier(.45,.05,.35,1) forwards; }
.stock .st-van.parked { offset-distance: 100%; }
@keyframes st-drive { from { offset-distance: 0%; } to { offset-distance: 100%; } }
.stock .st-cargo { opacity: 0; transition: opacity .35s ease; }
.stock .st-van.cargo .st-cargo { opacity: 1; }
.stock .st-van.parked .st-cargo { opacity: 0; transition-delay: .1s; }
.stock .sk-load { transition: opacity .3s ease; }
.stock .sk-load1 { transition-delay: .15s; } .stock .sk-load2 { transition-delay: .3s; }
.stock[class*=" s-t1"] .sk-load, .stock.s-t2 .sk-load, .stock.s-m0 .sk-load, .stock[class*=" s-a"] .sk-load, .stock.s-end .sk-load { opacity: 0; }

/* the packing shelves fill one abaya at a time when the van is in */
.stock .sk-fd { opacity: 0; transform: translateY(-12px); transition: opacity .25s ease, transform .45s var(--spring); }
.stock .sk-fd0, .stock .st-pack.full .sk-fd { opacity: 1; transform: none; }
.stock .st-pack.full .sk-fd1 { transition-delay: .25s; } .stock .st-pack.full .sk-fd2 { transition-delay: .33s; }
.stock .st-pack.full .sk-fd3 { transition-delay: .41s; } .stock .st-pack.full .sk-fd4 { transition-delay: .49s; }
.stock .st-pack.full .sk-fd5 { transition-delay: .57s; } .stock .st-pack.full .sk-fd6 { transition-delay: .65s; }
.stock .st-pack.full .sk-fd7 { transition-delay: .73s; } .stock .st-pack.full .sk-fd8 { transition-delay: .81s; }
.stock .st-pack.full .sk-fd9 { transition-delay: .89s; } .stock .st-pack.full .sk-fd10 { transition-delay: .97s; }
.stock.s-l0 .sk-fd0 { animation: st-pulse 1.1s ease-in-out infinite alternate; }
@keyframes st-pulse { from { opacity: 1 } to { opacity: .45 } }

/* light and shade: only the place (or the road) the beat is about */
.stock .sk-shade { opacity: 0; transition: opacity .6s var(--ease); }
.stock.s-l0 .sk-shade-wh, .stock.s-l0 .sk-shade-up { opacity: .24; }
.stock[class*=" s-t"] .sk-shade-up, .stock[class*=" s-t"] .sk-shade-dn { opacity: .24; }
.stock.s-m0 .sk-shade-up, .stock.s-m0 .sk-shade-dn, .stock.s-m0 .sk-shade-wh { opacity: .2; }
.stock[class*=" s-a"] .sk-shade-up, .stock[class*=" s-a"] .sk-shade-wh { opacity: .22; }
.stock .sk-lit { opacity: 0; transition: opacity .6s var(--ease); }
.stock.s-l0 .sk-lit-pack, .stock[class*=" s-a"] .sk-lit-pack { opacity: .75; }
.stock[class*=" s-t"] .sk-lit-wh { opacity: .75; }
.stock .sk-route { opacity: 0; transition: opacity .5s var(--ease); }
.stock.s-t2 .sk-route, .stock.s-m0 .sk-route { opacity: .95; }
.stock.s-m0 .sk-route { animation: st-march 1s linear infinite; }
@keyframes st-march { to { stroke-dashoffset: -32; } }

/* the two places, named over their rooms, each with its own count */
.stock .st-labels { position: absolute; inset: 0; }
.stock .st-tag { position: absolute; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; padding: 6px 7px 6px 12px; border-radius: 10px; background: #FFFDF7; color: var(--ink); font-size: 15px; font-weight: 800; white-space: nowrap; box-shadow: 0 1px 2px rgba(6,20,28,.12), 0 8px 18px -10px rgba(6,20,28,.3); transition: box-shadow .4s var(--ease); }
.stock[dir="rtl"] .st-tag { padding: 6px 12px 6px 7px; }
.stock .st-tag i { width: 8px; height: 8px; border-radius: 50%; background: #C0392B; }
.stock .st-tag-up i { background: #8A6FB8; }
.stock .st-tag-wh i { background: #E39B3B; }
.stock .st-tag-pack i { background: #0BBAD8; }
.stock .st-tag b { min-width: 30px; padding: 2px 8px; border-radius: 7px; background: #F1EADC; font-size: 15px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.stock .st-tag b.pop { animation: st-pop .6s var(--spring) 1; background: #D9F4E3; color: #1E6B3E; }
@keyframes st-pop { 0% { transform: scale(.7) } 60% { transform: scale(1.18) } 100% { transform: scale(1) } }
.stock.s-l0 .st-tag-pack, .stock[class*=" s-a"] .st-tag-pack { box-shadow: 0 0 0 2px #0BBAD8, 0 8px 18px -10px rgba(6,20,28,.3); }
.stock[class*=" s-t"] .st-tag-wh { box-shadow: 0 0 0 2px #E39B3B, 0 8px 18px -10px rgba(6,20,28,.3); }

/* ---------- copy at the start edge, clear of the house ---------- */
.stock .st-copy { position: absolute; inset-inline-start: 96px; top: 250px; width: 300px; }
.stock .st-copy .eyebrow img { width: 30px; height: 30px; border-radius: 9px; background: #fff; padding: 4px; box-shadow: var(--shadow-1); }
.stock .st-copy .h2 { font-size: 46px; }
.stock .st-copy .lead { margin: 16px 0 0; font-size: 17px; }
.stock .st-beats { margin-top: 22px; }
.stock .st-copy .beats { gap: 4px 18px; }
.stock .st-copy .beats li { font-size: 14px; }

/* ---------- the live phone ---------- */
.stock .st-phone { position: absolute; inset-inline-end: 48px; top: 110px; }
.stock .st-phone .phone { --pz: .72; }
.stock[lang="ar"] .st-p-en, .stock:not([lang="ar"]) .st-p-ar { display: none; }

/* ---------- narrow: copy, the drawing, the phone ---------- */
html.kp-narrow .stock .kframe { display: flex; flex-direction: column; padding: 88px 0 40px; }
html.kp-narrow .stock .st-copy { position: static; width: auto; padding: 0 20px; order: 1; }
html.kp-narrow .stock .st-copy .h2 { font-size: 38px; }
html.kp-narrow .stock .st-view { position: relative; inset: auto; order: 2; width: 700px; height: 800px; overflow: hidden; margin: 14px auto 0; zoom: .55; }
html.kp-narrow .stock .st-scene, html.kp-narrow .stock .st-labels { left: -390px; top: -70px; }
html.kp-narrow .stock[dir="rtl"] .st-scene, html.kp-narrow .stock[dir="rtl"] .st-labels { left: -350px; }
html.kp-narrow .stock .st-labels { position: absolute; width: 1440px; height: 900px; right: auto; bottom: auto; }
html.kp-narrow .stock .st-tag { font-size: 20px; }
html.kp-narrow .stock .st-tag b { font-size: 20px; }
html.kp-narrow .stock .st-phone { position: static; order: 3; display: flex; justify-content: center; margin-top: 20px; }
html.kp-narrow .stock .st-phone .phone { --pz: .7; }
@media (min-width: 420px) { html.kp-narrow .stock .st-view { zoom: .6; } }
@media (min-width: 520px) { html.kp-narrow .stock .st-view { zoom: .72; } }
@media (prefers-reduced-motion: reduce) { .stock .st-van.driving { animation: none; offset-distance: 100%; } .stock .sk-fd { transition: none !important; } .stock .sk-route { animation: none; } }

/* small phones (round 5): the drawing fits the screen width, nothing cut at the edge */
@media (max-width: 389px) { html.kp-narrow .stock .st-view { zoom: 0.514; } }
@media (max-width: 359px) { html.kp-narrow .stock .st-view { zoom: 0.457; } }

/* phones, told full screen (kphone-story.js, story/stock.js): the whole 1440 x 900 scene and its
   place names, moved by the story's camera; the old phone crop is undone. The names are a little
   larger than on wide screens, so they stay readable when the camera shows both places. */
html.kp-narrow .stock[data-kst] .st-view { position: absolute; inset: 0; width: auto; height: auto; margin: 0; overflow: visible; zoom: 1; }
html.kp-narrow .stock[data-kst] .st-scene, html.kp-narrow .stock[data-kst] .st-labels,
html.kp-narrow .stock[dir="rtl"][data-kst] .st-scene, html.kp-narrow .stock[dir="rtl"][data-kst] .st-labels { left: 0; top: 0; }
html.kp-narrow .stock[data-kst] .st-tag, html.kp-narrow .stock[data-kst] .st-tag b { font-size: 17px; }
/* phones, round 6: Noor is seen up close, so the packing room's name moves in front of her, on
   the room's front edge (inside the close shots, clear of the parked van in the town shots) */
html.kp-narrow .stock[data-kst] .st-tag-pack { left: 640px !important; top: 782px !important; }
html.kp-narrow .stock[dir="rtl"][data-kst] .st-tag-pack { left: 800px !important; }
