/* Сцена презентации Inelvex (макет B). Токены из Brandbook Inelvex v1. */
:root {
  --navy: #0B1320;
  --navy-2: #1F2937;
  --bg: #F8FAFC;
  --paper: #F7F5F0;
  --blue: #2563EB;
  --blue-dark: #1D4ED8;
  --gold: #C9A06D;
  --cyan: #06B6D4;
  --gray: #64748B;
  --line: #E2E8F0;
  --ok: #16A34A;
  --serif: "Source Serif 4", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow-dark: 0 30px 80px rgba(0, 0, 0, .5);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body.stage {
  font-family: var(--sans); -webkit-font-smoothing: antialiased; color: #E7ECF4; min-height: 100vh;
  background: radial-gradient(1200px 700px at 80% -10%, #16284A 0, var(--navy) 60%) fixed, var(--navy);
}
button { font: inherit; }

/* ---------- шапка сцены ---------- */
.stage-head { display: flex; align-items: center; gap: 18px; padding: 20px 40px 0; flex-wrap: wrap; }
.stage-head .wm { height: 15px; display: block; }
.client-pill { display: inline-flex; align-items: center; gap: 12px; padding: 6px 14px 6px 6px; border: 1px solid rgba(148,163,184,.22); border-radius: 999px; font-size: 14px; }
.client-pill img { width: 30px; height: 30px; border-radius: 50%; }
.client-pill b { color: #fff; font-weight: 600; }
.badge { font: 700 10.5px var(--sans); letter-spacing: .14em; color: var(--navy); background: var(--gold); padding: 4px 8px; border-radius: 5px; }
.stage-head .ctrl { margin-left: auto; display: flex; gap: 8px; }
.ctrl button { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #A9B4C7; padding: 7px 12px; background: transparent; border: 1px solid rgba(148,163,184,.22); border-radius: 10px; cursor: pointer; }
.ctrl button:hover { color: #fff; border-color: rgba(148,163,184,.45); }
.key { font: 600 11px var(--sans); color: #CBD5E1; border: 1px solid rgba(148,163,184,.35); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; }

/* ---------- раскладка ---------- */
.grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 40px; padding: 22px 40px 32px; align-items: start; }

/* браузер с сайтом клиента */
.browser { border-radius: 14px; overflow: hidden; background: #fff; box-shadow: var(--shadow-dark); border: 1px solid rgba(148,163,184,.25); position: relative; }
.b-bar { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; background: #EEF2F7; border-bottom: 1px solid var(--line); }
.b-bar i { width: 10px; height: 10px; border-radius: 50%; background: #CBD5E1; }
.b-bar .url { margin-left: 14px; flex: 1; max-width: 420px; height: 24px; border-radius: 7px; background: #fff; border: 1px solid var(--line); font-size: 12px; color: var(--gray); display: flex; align-items: center; padding: 0 10px; white-space: nowrap; overflow: hidden; }
.viewport { height: clamp(500px, calc(100vh - 330px), 760px); overflow-y: auto; overscroll-behavior: contain; position: relative; scroll-behavior: smooth; }

/* путь лида */
.journey { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.journey::before { content: ""; position: absolute; left: 12px; right: 12px; top: 11px; height: 2px; background: rgba(6,182,212,.25); }
.step { position: relative; padding-right: 14px; }
.step .dot { width: 24px; height: 24px; border-radius: 50%; background: var(--navy); border: 2px solid rgba(6,182,212,.5); display: grid; place-items: center; font: 700 11px var(--sans); color: var(--cyan); position: relative; transition: background .3s, color .3s; }
.step.done .dot { background: var(--cyan); color: var(--navy); border-color: var(--cyan); }
.step b { display: block; margin-top: 10px; font-size: 13.5px; color: #8E9AB0; font-weight: 600; transition: color .3s; }
.step.done b { color: #fff; }
.step .hint { font-size: 12px; color: #8E9AB0; font-variant-numeric: tabular-nums; }

.extra { margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(148,163,184,.16); }
.extra .lbl { font-size: 12.5px; color: #8E9AB0; margin-bottom: 10px; display: block; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { font-size: 13px; padding: 8px 13px; border-radius: 999px; border: 1px solid rgba(148,163,184,.3); color: #E7ECF4; background: rgba(255,255,255,.04); cursor: pointer; transition: background .2s, border-color .2s; }
.chips button:hover { background: rgba(255,255,255,.09); border-color: rgba(148,163,184,.55); }
.chips button.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.is-playing .chips button:not(.on) { opacity: .45; cursor: default; }

/* правая колонка */
.right { display: flex; flex-direction: column; align-items: center; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; margin-bottom: 18px; }
.stats div { padding: 0 10px; border-left: 1px solid rgba(148,163,184,.2); }
.stats div:first-child { border-left: 0; padding-left: 0; }
.stats b { font: 600 30px var(--serif); color: #fff; display: block; font-variant-numeric: tabular-nums; }
.stats span { font-size: 12px; color: #8E9AB0; }

.phone { width: 330px; height: 560px; border-radius: 48px; padding: 12px; background: #1A2232; box-shadow: var(--shadow-dark), inset 0 0 0 2px #2C374A; }
.phone.buzz { animation: buzz .5s ease; }
@keyframes buzz { 0%,100% { transform: none; } 20% { transform: translateX(-3px) rotate(-.6deg); } 40% { transform: translateX(3px) rotate(.6deg); } 60% { transform: translateX(-2px); } 80% { transform: translateX(2px); } }
.screen { height: 100%; border-radius: 38px; overflow: hidden; background: linear-gradient(170deg, #2A3D63 0%, #142038 55%, #0B1320 100%); padding: 0 12px; display: flex; flex-direction: column; }
.notch { width: 96px; height: 26px; border-radius: 999px; background: #05080E; margin: 10px auto 0; flex: none; }
.clock { text-align: center; color: #fff; margin: 14px 0 16px; flex: none; }
.clock small { font-size: 13px; opacity: .8; display: block; }
.clock b { font: 300 58px/1 var(--sans); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
#sms-list { flex: 1; overflow: hidden; }

.sms { background: rgba(245,247,250,.95); border-radius: 20px; padding: 10px 12px 11px; margin-bottom: 8px; color: var(--navy); box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.sms .s-top { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--gray); margin-bottom: 4px; }
.sms .s-app { width: 20px; height: 20px; border-radius: 6px; background: linear-gradient(180deg, #34D399, #10B981); display: grid; place-items: center; }
.sms .s-app svg { width: 12px; height: 12px; }
.sms .s-top b { color: var(--navy); font-weight: 600; letter-spacing: .02em; }
.sms .s-top .t { margin-left: auto; }
.sms .s-text { white-space: pre-line; line-height: 1.38; font-size: 12.5px; }
.sms .hl { font-weight: 600; }
.sms .prio { font-weight: 600; }
.sms .prio.hot { color: #B91C1C; }
.sms .prio.warm { color: #B45309; }
.sms.collapsed .s-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sms.new { animation: arrive .6s cubic-bezier(.2,.7,.2,1) both; }
@keyframes arrive { from { transform: translateY(-14px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.sms.slot { background: rgba(245,247,250,.1); color: #CBD5E1; box-shadow: none; border: 1px dashed rgba(255,255,255,.3); display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; padding: 12px; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.caption { margin-top: 14px; font-size: 13px; color: #A9B4C7; }
.note { margin-top: 14px; width: 100%; padding: 14px 16px; border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid rgba(148,163,184,.2); font-size: 13px; line-height: 1.5; color: #A9B4C7; display: flex; gap: 12px; }
.note b { color: #fff; font-weight: 600; }
.note svg { width: 18px; height: 18px; flex: none; color: var(--cyan); margin-top: 1px; }

/* ---------- виджет Inelvex внутри браузера ---------- */
.iw { position: absolute; right: 18px; bottom: 16px; z-index: 20; pointer-events: none; display: flex; flex-direction: column; align-items: flex-end; font-family: var(--sans); }
.iw > * { pointer-events: auto; }
.iw-launcher { width: 60px; height: 60px; border-radius: 50%; padding: 0; background: var(--navy); border: 2px solid var(--gold); box-shadow: 0 12px 30px rgba(11,19,32,.35); cursor: pointer; display: grid; place-items: center; position: relative; }
.iw-launcher img { width: 42px; height: 42px; border-radius: 50%; }
.iw-ping { position: absolute; top: -2px; right: -2px; width: 15px; height: 15px; border-radius: 50%; background: var(--cyan); border: 3px solid #fff; }
.iw-panel { display: none; width: 360px; max-height: min(560px, calc(100% - 20px)); flex-direction: column; border-radius: 18px; overflow: hidden; background: linear-gradient(165deg, #16213A, var(--navy) 70%); color: #EEF2F8; box-shadow: var(--shadow-dark); border: 1px solid rgba(148,163,184,.22); font-size: 14px; }
.iw.is-open .iw-panel { display: flex; animation: arrive .35s ease both; }
.iw.is-open .iw-launcher { display: none; }
.iw-head { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-bottom: 1px solid rgba(148,163,184,.18); flex: none; }
.iw-head img { width: 36px; height: 36px; border-radius: 50%; flex: none; }
.iw-title { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.iw-title b { font-weight: 600; font-size: 14.5px; }
.iw-title span { font-size: 12px; color: #9AA6BA; display: inline-flex; align-items: center; gap: 6px; }
.iw-title span i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.iw-x { margin-left: auto; background: none; border: 0; color: #9AA6BA; font-size: 22px; line-height: 1; cursor: pointer; padding: 4px 8px; }
.iw-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 120px; flex: 1; scroll-behavior: smooth; }
.iw-b { max-width: 86%; padding: 9px 12px; border-radius: 14px; line-height: 1.42; font-size: 13.5px; animation: arrive .3s ease both; }
.iw-ai { align-self: flex-start; background: rgba(255,255,255,.07); border: 1px solid rgba(148,163,184,.16); border-bottom-left-radius: 4px; }
.iw-me { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.iw-sys { align-self: center; max-width: 100%; font-size: 11.5px; color: #8FE3F0; background: rgba(6,182,212,.1); border: 1px solid rgba(6,182,212,.3); border-radius: 999px; padding: 5px 12px; text-align: center; }
.iw-typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.iw-typing i { width: 6px; height: 6px; border-radius: 50%; background: #94A3B8; animation: blink 1.2s infinite; }
.iw-typing i:nth-child(2) { animation-delay: .2s; } .iw-typing i:nth-child(3) { animation-delay: .4s; }
.iw-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px; flex: none; }
.iw-quick:not(:empty) { padding-bottom: 10px; }
.iw-quick button { font-size: 12px; padding: 6px 10px; border-radius: 999px; border: 1px solid rgba(148,163,184,.3); color: #CBD5E1; background: transparent; cursor: pointer; }
.iw-quick button:hover { border-color: #fff; color: #fff; }
.iw-input { display: flex; align-items: center; gap: 8px; margin: 0 12px 10px; padding: 5px 5px 5px 14px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(148,163,184,.2); flex: none; }
.iw-input input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: #fff; font: 14px var(--sans); padding: 6px 0; }
.iw-input input::placeholder { color: #8592A8; }
.iw-send { width: 34px; height: 34px; border-radius: 9px; background: var(--blue); border: 0; color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.iw-send svg { width: 18px; height: 18px; }
.iw.is-busy .iw-send { opacity: .5; }
.iw-foot { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 0 11px; font-size: 11px; color: #7C889C; flex: none; }
.iw-foot img { height: 8px; opacity: .8; }

/* ---------- адаптив ---------- */
@media (max-width: 1100px) {
  .grid { grid-template-columns: 1fr; }
  .right { order: 2; }
}
@media (max-width: 640px) {
  .stage-head { padding: 14px 16px 0; gap: 10px; }
  .client-pill { font-size: 13px; }
  .stage-head .ctrl { margin-left: 0; }
  .grid { padding: 14px 16px 24px; gap: 28px; }
  .b-bar .url { margin-left: 6px; }
  .viewport { height: 78vh; }
  .journey { grid-template-columns: repeat(2, 1fr); row-gap: 18px; }
  .journey::before { display: none; }
  .iw { right: 10px; bottom: 10px; left: 10px; }
  .iw-panel { width: 100%; }
  .phone { width: 300px; height: 520px; }
}
