/* ============================================================
   MKC Interactive Prototype — story / demo shell
   Builds on styles.css (tokens + components)
   ============================================================ */

.proto-body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 540px at 8% -8%, #103a6b 0%, transparent 55%),
    radial-gradient(900px 480px at 100% 0%, #0c4a52 0%, transparent 50%),
    #0a1830;
  color: #eaf1fa;
  display: flex; flex-direction: column;
  overflow-x: hidden;
}

/* ---------- top bar ---------- */
.proto-top {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 26px; border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(8,20,40,.6); backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 40;
}
.proto-top .logo { display: flex; align-items: center; gap: 10px; }
.proto-top .logo .m { width: 34px; height: 34px; border-radius: 10px; background: var(--grad-brand); display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 13px; }
.proto-top .logo b { font-size: 15px; color: #fff; letter-spacing: -.2px; }
.proto-top .logo span { font-size: 11px; color: #8ea7c8; display: block; margin-top: -2px; }

.journey-tabs { margin-left: 22px; display: flex; gap: 8px; flex-wrap: wrap; }
.journey-tabs button {
  font-family: var(--font); font-size: 13px; font-weight: 700; color: #b9cae0;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px; padding: 9px 16px; cursor: pointer; transition: .18s; display: flex; align-items: center; gap: 8px;
}
.journey-tabs button .dot { width: 8px; height: 8px; border-radius: 50%; }
.journey-tabs button:hover { background: rgba(255,255,255,.1); color: #fff; }
.journey-tabs button.active { background: #fff; color: var(--navy); border-color: #fff; }

.proto-top .right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.proto-top .right a { color: #9fb6d4; font-size: 12.5px; text-decoration: none; font-weight: 600; padding: 7px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.1); }
.proto-top .right a:hover { background: rgba(255,255,255,.07); color: #fff; }
.fs-btn { color: #9fb6d4; font-size: 12.5px; font-family: var(--font); text-decoration: none; font-weight: 600; padding: 7px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.1); background: none; cursor: pointer; }
.fs-btn:hover { background: rgba(255,255,255,.07); color: #fff; }
.proto-body:fullscreen .proto-top, .proto-body:-webkit-full-screen .proto-top { padding: 10px 22px; }

/* ---------- main stage ---------- */
.proto-main {
  flex: 1; display: grid; grid-template-columns: 300px 1fr; gap: 0;
  min-height: 0;
}

/* left: story rail */
.story-rail {
  padding: 26px 22px; border-right: 1px solid rgba(255,255,255,.08);
  background: rgba(8,18,36,.4);
}
.story-rail .persona {
  background: linear-gradient(150deg, rgba(27,178,230,.16), rgba(87,194,60,.10));
  border: 1px solid rgba(255,255,255,.1); border-radius: 18px; padding: 18px;
}
.story-rail .persona .pav { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; }
.story-rail .persona h3 { color: #fff; font-size: 17px; margin-top: 12px; }
.story-rail .persona p { color: #aebfd8; font-size: 12.5px; margin-top: 5px; line-height: 1.5; }

.steps-list { margin-top: 22px; }
.steps-list .sl-title { font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: #7d96b8; font-weight: 800; margin-bottom: 12px; }
.step-item {
  display: flex; gap: 12px; align-items: flex-start; padding: 9px 10px; border-radius: 11px; cursor: pointer; transition: .15s;
}
.step-item:hover { background: rgba(255,255,255,.05); }
.step-item .num {
  width: 24px; height: 24px; border-radius: 8px; flex: none; display: grid; place-items: center;
  font-size: 11px; font-weight: 800; background: rgba(255,255,255,.08); color: #9fb6d4; border: 1px solid rgba(255,255,255,.12);
}
.step-item .lbl { font-size: 12.5px; color: #b9cae0; font-weight: 600; padding-top: 3px; line-height: 1.35; }
.step-item.done .num { background: rgba(87,194,60,.2); color: #9be37e; border-color: rgba(87,194,60,.4); }
.step-item.active { background: rgba(255,255,255,.08); }
.step-item.active .num { background: var(--grad-brand); color: #fff; border: none; }
.step-item.active .lbl { color: #fff; }

/* right: device area */
.proto-stage {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 30px 20px 18px; position: relative; min-height: 0;
}
.proto-stage .bg-orbs::before, .proto-stage .bg-orbs::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(40px); z-index: 0;
}
.proto-stage .bg-orbs::before { width: 300px; height: 300px; background: rgba(27,178,230,.18); top: 6%; left: 10%; }
.proto-stage .bg-orbs::after { width: 260px; height: 260px; background: rgba(87,194,60,.14); bottom: 8%; right: 12%; }

/* ----- phone device ----- */
.device {
  width: 332px; height: 712px; flex: none; position: relative; z-index: 2;
  background: #0c1830; border-radius: 44px; padding: 11px;
  box-shadow: 0 40px 90px rgba(0,0,0,.55), 0 0 0 2px rgba(255,255,255,.04);
}
.device .scr {
  width: 100%; height: 100%; background: #fff; border-radius: 34px; overflow: hidden; position: relative;
}
.device .notch { position: absolute; top: 11px; left: 50%; transform: translateX(-50%); width: 124px; height: 26px; background: #0c1830; border-radius: 0 0 16px 16px; z-index: 30; }
.device .statusbar { height: 38px; }

/* scene viewport — starts below the statusbar so content is never masked by it */
.viewport { position: absolute; top: 38px; right: 0; bottom: 0; left: 0; overflow: hidden; }
.scene {
  position: absolute; inset: 0; background: #fff; display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; transform: translateX(40px) scale(.99);
  transition: opacity .34s ease, transform .38s cubic-bezier(.22,.8,.3,1);
  pointer-events: none;
}
.scene.active { opacity: 1; visibility: visible; transform: none; pointer-events: auto; z-index: 5; }
.scene.leaving-left { opacity: 0; transform: translateX(-40px) scale(.99); }
.scene.from-left { transform: translateX(-40px) scale(.99); }
.scene .screen-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.scene .screen-scroll::-webkit-scrollbar { width: 0; }

/* scroll-edge hints — toggled by JS as .not-top / .not-bottom, purely visual */
.screen-scroll, .web-scroll { transition: box-shadow .15s; }
.screen-scroll.not-top, .web-scroll.not-top { box-shadow: inset 0 6px 6px -6px rgba(11,42,91,.10); }
.screen-scroll.not-bottom, .web-scroll.not-bottom { box-shadow: inset 0 -6px 6px -6px rgba(11,42,91,.08); }
.screen-scroll.not-top.not-bottom, .web-scroll.not-top.not-bottom {
  box-shadow: inset 0 6px 6px -6px rgba(11,42,91,.10), inset 0 -6px 6px -6px rgba(11,42,91,.08);
}

/* hotspots */
[data-go] { cursor: pointer; position: relative; }
.hot { position: relative; }
.hint [data-go].hot::after {
  content: ""; position: absolute; inset: -4px; border-radius: inherit;
  box-shadow: 0 0 0 2px rgba(27,178,230,.9); animation: pulse 1.4s infinite; pointer-events: none;
  border-radius: 14px;
}
@keyframes pulse { 0%{box-shadow:0 0 0 2px rgba(27,178,230,.9)} 70%{box-shadow:0 0 0 8px rgba(27,178,230,0)} 100%{box-shadow:0 0 0 2px rgba(27,178,230,0)} }

/* tap ripple */
.tap-dot { position: absolute; width: 34px; height: 34px; border-radius: 50%; background: rgba(27,178,230,.35); border: 2px solid #1BB2E6; transform: translate(-50%,-50%) scale(.4); opacity: 0; pointer-events: none; z-index: 60; }
.tap-dot.go { animation: tap .5s ease-out; }
@keyframes tap { 0%{opacity:.9;transform:translate(-50%,-50%) scale(.4)} 100%{opacity:0;transform:translate(-50%,-50%) scale(1.4)} }

/* ----- laptop / web frame ----- */
.laptop { width: 760px; max-width: 92vw; z-index: 2; position: relative; }
.laptop .lid {
  background: #0c1830; border-radius: 16px 16px 0 0; padding: 10px; box-shadow: 0 30px 70px rgba(0,0,0,.5);
}
.laptop .lbar { display: flex; align-items: center; gap: 8px; padding: 0 4px 9px; }
.laptop .dots { display: flex; gap: 6px; } .laptop .dots i { width: 10px; height: 10px; border-radius: 50%; }
.laptop .dots i:nth-child(1){background:#ff5f57}.laptop .dots i:nth-child(2){background:#febc2e}.laptop .dots i:nth-child(3){background:#28c840}
.laptop .url { margin-left: 8px; flex: 1; background: #1b2c4a; color: #9fb6d4; border-radius: 7px; padding: 6px 12px; font-size: 11.5px; }
.laptop .web-view { background: #fff; border-radius: 8px; height: 470px; overflow: hidden; position: relative; }
.laptop .web-scroll { height: 100%; overflow-y: auto; }
.laptop .web-scroll::-webkit-scrollbar { width: 7px; }
.laptop .web-scroll::-webkit-scrollbar-track { background: transparent; }
.laptop .web-scroll::-webkit-scrollbar-thumb { background: rgba(11,42,91,.18); border-radius: 4px; }
.laptop .web-scroll::-webkit-scrollbar-thumb:hover { background: rgba(11,42,91,.32); }
.laptop .base { height: 14px; background: linear-gradient(#11233f,#0c1830); border-radius: 0 0 14px 14px; margin: 0 auto; width: 86%; box-shadow: 0 20px 40px rgba(0,0,0,.4); }
.laptop .foot { height: 8px; width: 120px; background: #0c1830; border-radius: 0 0 8px 8px; margin: 0 auto; }

/* stages visibility */
#phoneStage, #webStage { display: none; }
#phoneStage.show, #webStage.show { display: flex; flex-direction: column; align-items: center; }

/* ---------- bottom control / caption ---------- */
.proto-controls {
  width: 100%; max-width: 760px; margin-top: 20px; z-index: 3; position: relative;
}
.caption {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: 16px;
  padding: 14px 18px; display: flex; align-items: center; gap: 14px; min-height: 56px;
}
.caption .ci { width: 30px; height: 30px; border-radius: 9px; background: var(--grad-brand); display: grid; place-items: center; flex: none; color: #fff; font-weight: 800; font-size: 13px; }
.caption .ctxt { font-size: 14px; color: #e7eff9; line-height: 1.45; }
.caption .ctxt b { color: #fff; }

.ctrl-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; justify-content: center; }
.ctrl-row .dots-prog { display: flex; gap: 6px; margin: 0 8px; }
.ctrl-row .dots-prog i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.2); transition: .2s; }
.ctrl-row .dots-prog i.on { background: #1BB2E6; width: 20px; border-radius: 4px; }
.pbtn {
  font-family: var(--font); font-weight: 700; font-size: 13px; cursor: pointer;
  border-radius: 11px; padding: 11px 18px; border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06); color: #e7eff9; display: inline-flex; align-items: center; gap: 7px; transition: .15s;
}
.pbtn:hover { background: rgba(255,255,255,.13); }
.pbtn:disabled { opacity: .35; cursor: not-allowed; }
.pbtn.primary { background: var(--grad-brand); border: none; color: #fff; box-shadow: 0 8px 20px rgba(14,134,212,.4); }
.pbtn.play.on { background: var(--green); border: none; color: #fff; }

/* hint toggle pill */
.hint-toggle { font-size: 12px; color: #9fb6d4; display: flex; align-items: center; gap: 7px; cursor: pointer; user-select: none; }
.hint-toggle .sw { width: 34px; height: 19px; border-radius: 10px; background: rgba(255,255,255,.15); position: relative; transition: .2s; }
.hint-toggle .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: #fff; transition: .2s; }
.hint-toggle.on .sw { background: var(--green); } .hint-toggle.on .sw::after { left: 17px; }

/* ---------- start overlay ---------- */
.start-overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(7,16,32,.82); backdrop-filter: blur(8px);
  display: grid; place-items: center; padding: 20px;
}
.start-card {
  width: min(680px,94vw); border-radius: 26px; padding: 38px;
  background: linear-gradient(160deg,#11264a,#0c1c38); border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 40px 100px rgba(0,0,0,.6); text-align: center;
}
.start-card .m { width: 76px; height: 76px; border-radius: 22px; background: var(--grad-brand); display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 26px; margin: 0 auto; box-shadow: 0 16px 36px rgba(14,134,212,.5); }
.start-card h1 { color: #fff; font-size: 27px; margin-top: 18px; letter-spacing: -.6px; }
.start-card p { color: #aebfd8; font-size: 14px; margin-top: 8px; }
.start-journeys { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-top: 26px; }
.sj {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: 20px 14px;
  cursor: pointer; transition: .18s; text-align: center;
}
.sj:hover { background: rgba(255,255,255,.1); transform: translateY(-3px); border-color: rgba(27,178,230,.5); }
.sj .ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 22px; margin: 0 auto 12px; }
.sj h4 { color: #fff; font-size: 15px; } .sj span { color: #93a8c6; font-size: 11.5px; display: block; margin-top: 4px; }
.start-card .skip { margin-top: 22px; color: #8ea7c8; font-size: 12.5px; cursor: pointer; }
.start-card .skip:hover { color: #fff; }

@media (max-width: 980px) {
  .proto-main { grid-template-columns: 1fr; }
  .story-rail { display: none; }
}
