/* Orders, "Selling online" (agent A, round 4): an order arrives in Noor's chat; she makes the sale in Konto
   on the phone on her desk stand, packs the order, and the courier picks it up. */
.orders { --mark: #A3E4EE; }
.orders .or-wall { background: linear-gradient(180deg, #FCF4E6 0%, #F7EADA 60%, #F3E3CF 100%); }

/* ---------- Noor's room (one picture, mirrored for Arabic) ---------- */
.orders .or-view { position: absolute; inset: 0; pointer-events: none; }
.orders .or-scene { position: absolute; left: 0; top: 0; width: 1440px; height: 900px; transform-origin: 720px 0; pointer-events: none; }
.orders[dir="rtl"] .or-scene { transform: scaleX(-1); }
.orders .or-room, .orders .or-front { position: absolute; left: 0; top: 0; overflow: visible; }
/* while she packs, the room leans in toward the desk (the push-in mirrors with the scene) */
.orders .or-push { position: absolute; left: 0; top: 0; width: 1440px; height: 900px; transform-origin: 300px 846px; transition: transform 1.2s cubic-bezier(.45,.05,.2,1); }
.orders .or-view.packing .or-push { transform: scale(1.12); }
.orders .or-front { z-index: 3; }
.orders .or-noor { position: absolute; left: 280px; top: 513px; z-index: 1; }
.orders .or-noor > svg, .orders .or-mus > svg { display: block; overflow: visible; }
.orders .or-mus { position: absolute; left: -115px; top: 590px; z-index: 2; will-change: transform; }
.orders .kc .pr-box, .orders .kc .fing { opacity: 0 !important; }

/* Noor at her desk (seated poses: the phone on its stand at her right, the box at her left) */
.orders .or-look .kc { --sh-r: -38.4deg; --el-r: 85.6deg; --sh-l: 31.3deg; --el-l: -84.2deg; }
.orders .or-tap .kc { --sh-r: -39.8deg; --el-r: -63.9deg; --sh-l: 31.3deg; --el-l: -84.2deg; }
.orders .or-hold .kc { --sh-r: -87.5deg; --el-r: 156deg; --sh-l: 87.5deg; --el-l: -156deg; }
.orders .or-box .kc { --sh-r: 52deg; --el-r: 28.3deg; --sh-l: 28.5deg; --el-l: 74.9deg; }
.orders .or-scarf .kc { --sh-r: 20.7deg; --el-r: -106.7deg; --sh-l: 31.3deg; --el-l: -84.2deg; }
.orders .or-wave .kc { --sh-r: -130.3deg; --el-r: -47.1deg; --sh-l: 31.3deg; --el-l: -84.2deg; }

/* the phone on its stand: Konto is open while she makes the sale */
.orders .or-stapp { opacity: 0; transition: opacity .4s var(--ease); }
.orders .or-stand.on .or-stapp { opacity: 1; }

/* packing: the desk lamp warms the desk; the chat steps back */
.orders .or-pool { opacity: 0; transition: opacity .8s var(--ease); }
.orders .or-view.packing .or-pool { opacity: 1; }
.orders .or-held { opacity: 0; transform: translateY(14px); transition: opacity .35s ease, transform .5s var(--spring); }
.orders .or-held.on { opacity: 1; transform: none; }
.orders .or-ab, .orders .or-sc { transition: transform .55s cubic-bezier(.45,.05,.2,1), opacity .3s ease; }
.orders .or-flap { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .45s cubic-bezier(.45,.05,.2,1); }
.orders .or-flaps.shut .or-flap { transform: scaleY(0); }
.orders .or-lid { opacity: 0; transition: opacity .2s ease .3s; }
.orders .or-lid.on { opacity: 1; }
.orders .or-tape { transform-box: fill-box; transform-origin: 50% 0; transform: scaleY(0); transition: transform .45s ease .45s; }
.orders .or-tape.on { transform: none; }
.orders .or-label { transform-box: fill-box; transform-origin: 50% 50%; transform: scale(0); transition: transform .45s var(--spring); }
.orders .or-label.on { transform: none; }

/* ---------- copy ---------- */
.orders .or-copy { position: absolute; inset-inline-start: 96px; top: 100px; width: 470px; z-index: 4; }
.orders .or-eyeic { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: #fff; color: var(--c700); box-shadow: var(--shadow-1); }
.orders .or-eyeic svg { width: 18px; height: 18px; }
.orders .or-copy .h2 { font-size: 50px; }
.orders .or-copy .lead { margin-top: 16px; font-size: 18px; }
.orders .or-facts { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 6px; }
.orders .or-facts li { position: relative; padding-inline-start: 18px; font-size: 15px; font-weight: 700; line-height: 1.4; }
.orders .or-facts li::before { content: ""; position: absolute; inset-inline-start: 0; top: .45em; width: 8px; height: 8px; border-radius: 2px; background: var(--c500); }
.orders .or-beats { position: absolute; inset-inline-start: 604px; top: 634px; width: 400px; z-index: 4; }
.orders .or-beats .beats { gap: 4px 18px; }
.orders .or-beats .beats li { font-size: 14px; padding-bottom: 7px; }

/* ---------- the chat (a drawing of a brand-free messages screen) ---------- */
.orders .or-chat {
  position: absolute; inset-inline-start: 604px; top: 112px; width: 352px; height: 506px; z-index: 3;
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 34px; background: #F3EFE9; border: 7px solid #1A262E;
  box-shadow: 0 2px 4px rgba(6,20,28,.12), 0 26px 60px -16px rgba(6,20,28,.32);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.orders .or-chat.resting { transform: scale(.97); box-shadow: 0 1px 2px rgba(6,20,28,.1), 0 12px 30px -16px rgba(6,20,28,.2); }
.orders .or-chat.away { opacity: .42; transform: scale(.95); }
.orders .or-chat { transition: transform .5s var(--ease), box-shadow .5s var(--ease), opacity .6s var(--ease); }
.orders .or-head { display: flex; align-items: center; gap: 10px; padding: 16px 16px 12px; background: #FFFFFF; border-bottom: 1px solid #E7E1D8; transition: opacity .35s var(--ease); }
.orders .or-back { width: 20px; height: 20px; color: #4A6275; flex: none; }
[dir="rtl"] .orders .or-back, .orders[dir="rtl"] .or-back { transform: scaleX(-1); }
.orders .or-av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; background: #2F8A7A; color: #fff; font-weight: 800; font-size: 16px; }
.orders .or-who { display: grid; line-height: 1.2; }
.orders .or-who b { font-size: 16px; font-weight: 800; }
.orders .or-who small { font-size: 12px; color: #2F8A5A; font-weight: 600; }
.orders .or-head .or-ck { margin-inline-start: auto; }
.orders .or-body { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 14px; }
.orders .or-day { align-self: center; font-size: 11px; font-weight: 700; color: #6B7C88; background: #E4DED5; padding: 3px 10px; border-radius: 8px; margin-bottom: 4px; }
.orders .or-b {
  position: relative; margin: 0; max-width: 86%; display: flex; align-items: center; gap: 8px;
  padding: 10px 13px; border-radius: 16px; font-size: 16px; font-weight: 600; line-height: 1.35;
  background: #FFFFFF; color: #1B2A33; box-shadow: 0 1px 1px rgba(6,20,28,.08);
  opacity: 0; transform: translateY(12px) scale(.97); transform-origin: 0 100%;
  transition: opacity .35s var(--ease), transform .45s var(--spring), background .3s;
}
.orders .or-b.in { border-end-start-radius: 5px; }
.orders .or-b.out { align-self: flex-end; background: #DCEFF7; border-end-end-radius: 5px; transform-origin: 100% 100%; }
.orders .or-b.show { opacity: 1; transform: none; }
.orders .or-b.show.dim, .orders .or-head.dim { opacity: .4; }
.orders .or-b.show.lit.item { background: #FFFFFF; box-shadow: 0 0 0 2px #0BBAD8, 0 6px 14px -6px rgba(11,186,216,.5); }
.orders .or-chat:not(.focusing) .or-b.show.lit.item { box-shadow: 0 1px 1px rgba(6,20,28,.08); }
.orders .or-head.lit { opacity: 1; }
.orders .or-chat.focusing .or-head.lit { box-shadow: inset 0 0 0 2px #0BBAD8; }
.orders .or-ck { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #1E8449; color: #fff; transform: scale(0); opacity: 0; transition: transform .45s var(--spring), opacity .2s; }
.orders .or-ck svg { width: 13px; height: 13px; }
.orders .ok > .or-ck, .orders .or-head.ok .or-ck { transform: scale(1); opacity: 1; }
.orders .or-tick { width: 18px; height: 11px; color: #0A8A9C; flex: none; }
.orders .or-typing { align-self: flex-end; display: flex; gap: 4px; margin: 0; padding: 10px 12px; border-radius: 14px; background: #DCEFF7; opacity: 0; transform: scale(.8); transition: opacity .25s, transform .3s var(--spring); height: 0; padding-block: 0; overflow: hidden; }
.orders .or-typing.show { opacity: 1; transform: none; height: auto; padding-block: 10px; }
.orders .or-typing i { width: 7px; height: 7px; border-radius: 50%; background: #4A8BA0; animation: or-dot 1s ease-in-out infinite; }
.orders .or-typing i:nth-child(2) { animation-delay: .15s; } .orders .or-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes or-dot { 0%, 100% { transform: translateY(0); opacity: .5 } 50% { transform: translateY(-3px); opacity: 1 } }
.orders .or-compose { display: flex; align-items: center; gap: 10px; margin: 0 12px 14px; padding: 0 6px 0 16px; height: 44px; border-radius: 22px; background: #FFFFFF; font-size: 14px; color: #8A979F; }
.orders .or-compose i { margin-inline-start: auto; width: 32px; height: 32px; border-radius: 50%; background: #2A3F4D; }

/* ---------- the live phone, lit while Noor works in Konto ---------- */
.orders .or-phone { position: absolute; inset-inline-end: 56px; top: 98px; z-index: 2; }
.orders .or-phone .phone { --pz: .8; }
.orders .or-glow { position: absolute; left: 50%; top: 50%; width: 620px; height: 900px; margin: -450px 0 0 -310px; border-radius: 50%; background: radial-gradient(closest-side, rgba(11,186,216,.32), rgba(11,186,216,0)); opacity: 0; transition: opacity .6s var(--ease); pointer-events: none; }
.orders .or-phone.glow .or-glow { opacity: 1; }
.orders[lang="ar"] .or-p-en, .orders:not([lang="ar"]) .or-p-ar { display: none; }

/* ---------- narrow: copy, the desk, the chat, the steps, the phone ---------- */
html.kp-narrow .orders .kframe { display: flex; flex-direction: column; align-items: stretch; padding: 88px 0 40px; }
html.kp-narrow .orders .or-copy, html.kp-narrow .orders .or-beats { position: static; width: auto; padding: 0 20px; }
html.kp-narrow .orders .or-copy .h2 { font-size: 38px; }
html.kp-narrow .orders .or-copy .lead { font-size: 17px; }
html.kp-narrow .orders .or-view { position: relative; inset: auto; order: 2; width: 640px; height: 360px; overflow: hidden; margin: 10px auto 0; zoom: .6; }
html.kp-narrow .orders .or-scene { left: -10px; top: -494px; }
html.kp-narrow .orders[dir="rtl"] .or-scene { left: -790px; }
html.kp-narrow .orders .or-chat { position: relative; inset: auto; order: 4; margin: 18px auto 0; zoom: .66; }
html.kp-narrow .orders .or-chat.away { opacity: 1; transform: none; }
html.kp-narrow .orders .or-view.packing .or-push { transform: none; }
html.kp-narrow .orders .or-beats { order: 4; padding-top: 18px; }
html.kp-narrow .orders .or-phone { position: relative; inset: auto; order: 5; display: flex; justify-content: center; margin-top: 22px; }
html.kp-narrow .orders .or-phone .phone { --pz: .7; }
@media (min-width: 420px) { html.kp-narrow .orders .or-view { zoom: .66; } }
@media (min-width: 520px) { html.kp-narrow .orders .or-view { zoom: .8; } }
@media (prefers-reduced-motion: reduce) { .orders .or-mus, .orders .or-box { transition: none !important; } }

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

/* phones, told full screen (kphone-story.js, story/orders.js): the room and the chat are one
   1440 x 900 picture (.or-art), moved by the story's camera. The chat sits above Noor's desk so
   the order and Noor read together; the old phone crop is undone. On other layouts .or-art
   is only a box around the two (display: contents). */
.orders .or-art { display: contents; }
html.kp-narrow .orders[data-kst] .or-art { display: block; }
html.kp-narrow .orders[data-kst] .or-view { position: absolute; inset: 0; width: auto; height: auto; margin: 0; overflow: visible; zoom: 1; }
html.kp-narrow .orders[data-kst] .or-scene, html.kp-narrow .orders[dir="rtl"][data-kst] .or-scene { left: 0; top: 0; }
html.kp-narrow .orders[data-kst] .or-chat { position: absolute; inset: auto; inset-inline-start: 254px; top: 116px; height: 440px; margin: 0; zoom: 1; }
html.kp-narrow .orders[data-kst] .or-chat.away { opacity: 0; transform: translateY(-24px) scale(.96); }
/* while she works at her phone (the close-up on the desk), the chat steps away */
html.kp-narrow .orders[data-kst] .or-chat.resting { opacity: 0; }
/* and stays away after the courier leaves (the closing card comes up over that moment) */
html.kp-narrow .orders.is-done[data-kst] .or-chat { opacity: 0; }
