/* ============================================================
   CONCEPT 8 — THE REAL PAGE, WHOLE
   Every screen is the real app page in a window (a Win). Motion: whole windows, the dot, real states. Nothing lifted.
   ============================================================ */

/* ---------- the window: a title bar at native size, the real page scaled inside a clip ---------- */
.win{position:relative;background:#fff;border-radius:var(--r-win);box-shadow:var(--win-shadow);overflow:hidden;transform-style:flat}
.wtb{height:36px;display:flex;align-items:center;gap:7px;padding-inline:14px;background:#f6f8fb;border-bottom:1px solid var(--line);font-family:var(--ff-ar);direction:inherit}
html[lang=en] .wtb{font-family:var(--ff-en)}
.wtb i{width:10px;height:10px;border-radius:50%;background:#e3e7ee;flex:none}
.wtb i:nth-child(1){background:#ff5f57}.wtb i:nth-child(2){background:#febc2e}.wtb i:nth-child(3){background:#28c840}
.wtb .addr{margin-inline:auto;font-size:12px;line-height:1;color:var(--ink-3);background:#fff;border:1px solid var(--line);padding:6px 14px 5px;border-radius:999px;font-weight:600;white-space:nowrap;max-width:70%;overflow:hidden;text-overflow:ellipsis}
.wclip{position:relative;overflow:hidden;background:#eef2fb}
.doc{position:absolute;left:0;top:0;width:1440px;height:900px;transform-origin:0 0;pointer-events:none;will-change:opacity}
.lib{position:fixed;left:-30000px;top:0;visibility:hidden;pointer-events:none}

/* ---------- the hero scene: ONE rigid window in a perspective box, whole panels beside it ---------- */
.scene{position:relative;margin-inline:auto;perspective:1400px;perspective-origin:50% 45%;touch-action:pan-y}
.cam{position:absolute;inset:0;transform-style:preserve-3d;will-change:transform}
.hero-win{position:absolute;left:0;top:0;will-change:transform,opacity}
.side{position:absolute;left:0;top:0;will-change:transform,opacity;z-index:2}
.stage{padding:30px 0 70px}
html.intro-pending .stage.nw-veil{opacity:0}
.dive-veil{position:absolute;inset:-40px;background:#eef2fb;opacity:0;pointer-events:none;z-index:4;will-change:opacity}

/* ---------- the dot of the demos ---------- */
.rcur{position:absolute;left:0;top:0;z-index:5;opacity:0;pointer-events:none;will-change:transform}
.rcur .rdot{position:absolute;left:-6px;top:-6px;width:12px;height:12px;border-radius:50%;background:var(--ink);border:1.5px solid transparent;box-sizing:border-box;transition:width .28s var(--ease),height .28s var(--ease),left .28s var(--ease),top .28s var(--ease),background .28s var(--ease),border-color .28s var(--ease)}
.rcur.is-ring .rdot{left:-20px;top:-20px;width:40px;height:40px;background:transparent;border-color:var(--ink)}
.rcur .tag:empty{display:none}
.rcur .tag{position:absolute;top:14px;inset-inline-start:14px;white-space:nowrap;font-size:12px;line-height:1;font-weight:700;color:#fff;background:var(--ink);padding:6px 9px 5px;border-radius:8px;box-shadow:0 4px 12px rgb(31 36 51 / .3)}
.rcur.tag-l .tag{inset-inline-start:auto;inset-inline-end:auto;left:auto;right:14px}
.rcur.tag-r .tag{inset-inline-start:auto;inset-inline-end:auto;right:auto;left:14px}
.rcur .ripple{position:absolute;left:-16px;top:-16px;width:32px;height:32px;border-radius:50%;border:2px solid var(--rc,var(--cyan));opacity:0;transform:scale(.3)}
.rcur .ripple.go{animation:ripple .5s var(--ease-out) forwards}
@keyframes ripple{0%{opacity:.4;transform:scale(.3)}100%{opacity:0;transform:scale(1.5)}}

/* ---------- §3 story ---------- */
.morning-stage{position:relative}
.morning-stage .scene-host{position:relative}
.story-win .wclip{transition:height .5s var(--ease)}
.morning-grid{grid-template-columns:minmax(0,.5fr) minmax(0,1.5fr)}
.step-win{display:none}

/* ---------- §4 buses · §5 forms: one window, centred ---------- */
.bus-stage,.forms-stage{position:relative;margin:28px auto 0;width:min(1180px,100% - 2*var(--gutter));display:flex;justify-content:center}
.bus-stage .scene-host,.forms-stage .scene-host{position:relative}
.bus-stage .win,.forms-stage .win{will-change:transform,opacity}

/* ---------- §6 modules: each card shows ONE real screen, cropped; collapsed cards keep a strip of it ---------- */
.mini{position:absolute;inset:0;overflow:hidden}
.mini-win{border-radius:0;box-shadow:none}
.mods .pnl-shot{opacity:1;transform:none;transition:opacity .45s var(--ease),transform .6s var(--ease)}
.mods .pnl:not(.is-open) .pnl-shot{opacity:.9;transform:translateY(10px)}
.mods .pnl.is-open .pnl-shot{transition-delay:0s}

/* ---------- §7 the phone row ---------- */
.app-stage{position:relative;margin-top:26px;height:560px;overflow:clip;perspective:none;touch-action:pan-y;cursor:grab;user-select:none;-webkit-user-select:none}
.app-stage.is-grab{cursor:grabbing}
html.cur-on .app-stage,html.cur-on .app-stage *{cursor:none}
.cyl{position:absolute;inset:0;transform-style:preserve-3d}
.ph{position:absolute;left:50%;top:26px;width:240px;margin-left:-120px;aspect-ratio:640/1333;transform-style:preserve-3d;will-change:transform,opacity;cursor:inherit}
.ph .pf{position:absolute;left:4%;right:4%;bottom:-16px;height:24px;border-radius:50%;background:radial-gradient(ellipse at 50% 50%, rgb(31 36 51 / .22), rgb(31 36 51 / .08) 50%, transparent 72%);pointer-events:none}
.ph .card{position:absolute;inset:0;transform-style:preserve-3d;will-change:transform}
.ph .face{position:absolute;inset:0;backface-visibility:visible;-webkit-backface-visibility:visible}
.ph .face img{width:100%;height:100%;display:block;-webkit-user-drag:none;pointer-events:none}
.ph .face.back{opacity:0;transform:none}
.ph .psh{display:none}
.app-cap{display:block;text-align:center;font-size:14px;color:var(--ink-3);margin-top:18px;position:relative;z-index:2}
.app-head .p{margin-top:16px}

/* ---------- §9 closing: the real window, whole, the phone in front of its corner — all inside the card ---------- */
.end-iso{position:relative;z-index:1;perspective:none;min-height:440px;overflow:hidden}
.end-iso .scene-host{position:absolute;inset-inline-start:24px;top:50%;transform:translateY(-50%);width:82%}
.end-win{box-shadow:0 40px 80px -30px rgb(0 0 0 / .6),0 0 0 1px rgb(255 255 255 / .1)}
.end-phone{position:absolute;width:24%;max-width:170px;inset-inline-end:24px;bottom:22px;z-index:3;filter:none}
.end-phone img{width:100%;height:auto;display:block;position:relative}

/* ---------- §1 panel preview: the real page the item opens ---------- */
.panel-prod{grid-template-columns:minmax(0,1fr) 240px}
.pprev{position:relative;border-radius:14px;background:var(--surface-2);border:1px solid var(--line);overflow:hidden;display:flex;align-items:flex-start;justify-content:center;min-height:180px}
.prev-win{border-radius:0;box-shadow:none;width:100%}

/* ---------- responsive ---------- */
@media (max-width:1100px){.pprev{display:none}.panel-prod{grid-template-columns:1fr}}
@media (max-width:900px){
  .mods .pnl{min-height:128px}
  .mods .pnl:not(.is-open) .pnl-shot{top:72px;transform:none;opacity:1}
  .app-stage{height:520px}
  .ph{width:220px;margin-left:-110px}
  .morning-grid{grid-template-columns:1fr}
}
@media (max-width:980px){
  .tabs-wrap{justify-content:flex-start;padding:0;mask-image:linear-gradient(to right,transparent,#000 24px,#000 calc(100% - 24px),transparent);-webkit-mask-image:linear-gradient(to right,transparent,#000 24px,#000 calc(100% - 24px),transparent)}
  .tabs{overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;flex-wrap:nowrap;padding:5px 24px;border-radius:0;border:0;background:transparent;box-shadow:none;max-width:100%}
  .tabs::-webkit-scrollbar{display:none}
  .tab{flex:0 0 auto;scroll-snap-align:center;height:36px;font-size:13.5px;background:rgb(255 255 255 / .6);border:1px solid var(--line)}
  .tab.is-on{background:#fff}
  .tabs .thumb{display:none}
}
@media (max-width:760px){
  .scene-host,.bus-stage .scene-host,.forms-stage .scene-host,.end-iso .scene-host{display:block}
  .stage{margin-top:24px;padding:10px 0 30px}
  .scene{perspective:none}
  .cam{transform:none!important}
  .morning-stage{display:none}
  .step-win{display:block;position:relative;margin-top:12px}
  .app-stage{height:370px;margin-top:18px}
  .ph{width:150px;margin-left:-75px;top:24px}
  .ptitles{display:none}
  .pdots{display:flex}
  .end-iso{min-height:0;height:min(72vw,320px);margin:0 16px 24px;position:relative}
  .end-iso .scene-host{inset-inline-start:0;width:86%}
  .end-phone{inset-inline-end:0;bottom:0;width:28%}
  .end-card{transform:none!important}
  .wtb{height:32px;padding-inline:12px;gap:6px}
  .wtb i{width:9px;height:9px}
  .wtb .addr{font-size:11px;padding:5px 10px 4px}
}
@media (prefers-reduced-motion:reduce){
  .cam{transform:none!important}
  .rcur{display:none!important}
  .dive-veil{display:none!important}
}
/* balanced heading/lede lines (no lone last word); pinned heads clear the floating header */
.h1,.h2,.sec-head .p{text-wrap:balance}
@media (min-width:761px){.buses-pin>.sec-head,.forms-pin>.sec-head{padding-top:28px}}
.buses-pin,.forms-pin{min-height:0;padding:72px 0 40px}

/* ---------- pill text optically centred: measured per label by site.js (centerPills); this is only the no-JS fallback ---------- */
html[lang=ar] :is(.btn,.tab,.nav a,.nav button,.menu-btn,.panel-row a,.eyebrow,.roles button,.ptitles button)>span{position:relative;top:.1em}
.lang b{position:relative}

/* ============================================================
   ROUND 2 — COVERAGE: the hero hands over to the story with no blank frame; the message hub, the parent portal,
   a pill strip under every showcase window, and one block per main menu
   ============================================================ */
/* the hero: tighter rhythm above the window (the window's top edge sits inside the first 900px at 1440) */
@media (min-width:761px){
  .hero{padding-top:calc(var(--hdr-h) + 34px)}
  .h1{margin-top:14px}
  .lede{margin-top:14px}
  .cta-row{margin-top:20px}
  .tabs-wrap{margin-top:24px}
  .stage{margin-top:22px;padding:20px 0 70px}
}
/* the hand-over: the story sits UNDER the hero (pulled up by c8.js) and fades in while the dived window fades out */
.hero{z-index:2}
.morning{z-index:1}

/* ---------- pill strip under a window ---------- */
.pills{display:flex;justify-content:center;gap:6px;margin-top:18px;flex-wrap:wrap;position:relative;z-index:2}
.pills:empty{display:none}
.pill{display:inline-flex;align-items:center;gap:7px;height:34px;padding:0 14px;border-radius:999px;border:1px solid var(--line);background:rgb(255 255 255 / .6);font-size:13.5px;font-weight:700;color:var(--ink-3);white-space:nowrap;transition:background .3s,color .3s,border-color .3s,box-shadow .3s}
.pill .dot{width:7px;height:7px;opacity:.5;transition:opacity .3s,transform .3s var(--ease)}
.pill:hover{color:var(--ink);background:#fff}
.pill.is-on{background:#fff;color:var(--teal);border-color:#c9d1e0;box-shadow:0 6px 16px -8px rgb(31 36 51 / .25)}
.pill.is-on .dot{opacity:1;transform:scale(1.15)}
.strip-win{will-change:transform,opacity}
.strip-win .wclip{transition:height .5s var(--ease)}

/* ---------- §3b message hub ---------- */
.hub{position:relative;overflow:clip;padding:72px 0 40px}
.hub-stage{position:relative;margin:28px auto 0;width:min(1180px,100% - 2*var(--gutter));display:flex;justify-content:center}
.hub-stage .scene-host{position:relative}

/* ---------- §5b parent portal: the web window and the parents' phone side by side ---------- */
.portal{position:relative;overflow:clip;padding:72px 0 40px}
.portal-grid{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 240px;gap:36px;align-items:center;margin-top:28px;max-width:1180px}
.portal-web{position:relative;min-width:0}
.portal-web .scene-host{position:relative}
.portal-phone{position:relative;width:240px;aspect-ratio:640/1333;margin:0 auto;will-change:transform,opacity}
.portal-phone .pf{position:absolute;left:4%;right:4%;bottom:-16px;height:24px;border-radius:50%;background:radial-gradient(ellipse at 50% 50%, rgb(31 36 51 / .22), rgb(31 36 51 / .08) 50%, transparent 72%);pointer-events:none}
.portal-phone .face{position:absolute;inset:0}
.portal-phone .face img{width:100%;height:100%;display:block;-webkit-user-drag:none;pointer-events:none}
.portal-phone .face.back{opacity:0}

/* ---------- §6 the modules: one compact block per main menu ---------- */
.mods-wrap{padding:clamp(72px,9vw,120px) 0 20px}
.blk{position:relative;margin-top:72px;scroll-margin-top:84px;overflow:clip;padding-bottom:8px}
.blk:first-of-type{margin-top:44px}
.blk-head{text-align:center;display:flex;flex-direction:column;align-items:center}
.blk-head h3{display:inline-flex;align-items:center;gap:10px;margin:0;font-family:var(--ff-ar);font-weight:700;font-size:clamp(24px,2.6vw,34px);line-height:1.3;letter-spacing:0}
html[lang=en] .blk-head h3{font-family:var(--ff-en);font-weight:800;letter-spacing:-.02em}
.blk-head h3 .dot{width:11px;height:11px;flex:none}
.blk-head .p{margin-top:8px;text-align:center}
.blk-stage{position:relative;margin:24px auto 0;width:min(880px,100% - 2*var(--gutter));display:flex;justify-content:center}
.blk-stage .scene-host{position:relative}

@media (max-width:900px){
  .portal-grid{grid-template-columns:1fr;gap:28px}
  .portal-phone{width:200px}
}
@media (max-width:760px){
  .hub,.portal{padding:56px 0 20px}
  .hub-stage,.blk-stage{margin-top:20px}
  .hub-stage .scene-host,.portal-web .scene-host,.blk-stage .scene-host{display:block;width:100%}
  .pills{flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;scrollbar-width:none;margin-inline:calc(-1 * var(--gutter));padding:4px var(--gutter) 8px;mask-image:linear-gradient(to right,transparent,#000 16px,#000 calc(100% - 16px),transparent);-webkit-mask-image:linear-gradient(to right,transparent,#000 16px,#000 calc(100% - 16px),transparent)}
  .pills::-webkit-scrollbar{display:none}
  .pill{flex:0 0 auto;height:32px;font-size:13px;padding:0 12px}
  .mods-wrap{padding:56px 0 10px}
  .blk{margin-top:48px}
  .blk-head h3{font-size:24px}
  .portal-phone{width:170px}
}
