/* OrgBOS сайт — страница /demo/ (дорожка Б, 01-SPEC §6.7). Только переменные theme.css. */

/* Локальная переменная: слепок платформы всегда светлый, фон под ним — белый лист. */
:root { --demo-paper: #ffffff; }

.demo-intro { padding: var(--sp-7) 0 var(--sp-6); }
.demo-h1 { font-size: var(--fs-h2); max-width: 18ch; }
.demo-h2 { font-size: clamp(28px, 3.4vw, 44px); }
.demo-lead { margin-top: var(--sp-5); max-width: 62ch; font-size: var(--fs-lead); color: var(--ink-2); }
.demo-lead--2 { margin-top: var(--sp-4); }

/* ---------- Рамка кабинета ---------- */
.demo-stage { padding-bottom: var(--sp-7); }
.demo-bar { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-3); flex-wrap: wrap; }
.demo-bar__gap { flex: 1; }
.demo-seg { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: var(--radius-pill); }
.demo-tool {
  display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 36px; padding: 0 var(--sp-4);
  border: 1px solid var(--line); border-radius: var(--radius-pill); background: transparent;
  color: var(--ink-2); font: 600 var(--fs-small)/1 var(--font); cursor: pointer;
}
.demo-seg .demo-tool { border-color: transparent; min-height: 30px; }
.demo-tool:hover { color: var(--ink); }
.demo-tool[aria-pressed="true"] { color: var(--ink); background: var(--accent-soft); }
#demo-hints[aria-pressed="true"] { border-color: var(--accent); }
.demo-tool__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
#demo-hints[aria-pressed="true"] .demo-tool__dot { background: var(--accent); }

.demo-frame {
  position: relative; padding: var(--sp-2); border-radius: var(--radius-lg);
  background: var(--frame); box-shadow: var(--shadow);
}
.demo-frame__box {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  border-radius: var(--radius); background: var(--frame);
}
.demo-frame__iframe { display: block; width: 100%; height: 100%; border: 0; background: var(--demo-paper); }
.demo-frame__open { display: none; }

/* Полноэкранный режим обёртки (Fullscreen API) */
.demo-frame:fullscreen { padding: 0; border-radius: 0; box-shadow: none; }
.demo-frame:fullscreen .demo-frame__box { aspect-ratio: auto; width: 100vw; height: 100vh; border-radius: 0; }
.demo-frame:-webkit-full-screen { padding: 0; border-radius: 0; }
.demo-frame:-webkit-full-screen .demo-frame__box { aspect-ratio: auto; width: 100vw; height: 100vh; border-radius: 0; }

/* Телефон и узкий планшет: кабинет 1280 px, уменьшен под ширину, нажатия выключены */
@media (max-width: 767px) {
  .demo-bar { display: none; }
  .demo-frame { padding: var(--sp-1); border-radius: var(--radius); }
  .demo-frame__box { border-radius: var(--radius-sm); }
  .demo-frame__iframe {
    position: absolute; left: 0; top: 0; width: 1280px; height: 800px; max-width: none;
    transform-origin: 0 0; pointer-events: none;
  }
  .demo-frame__open {
    display: inline-flex; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    white-space: normal; text-align: center; max-width: calc(100% - var(--sp-6)); line-height: 1.2;
    box-shadow: var(--shadow);
  }
  .demo-frame__open:active { transform: translate(-50%, -50%); }
}

/* ---------- Разделы кабинета ---------- */
.demo-sections { padding: var(--section-y) 0; background: var(--bg-2); }
.demo-cards {
  list-style: none; padding: 0; margin: var(--sp-6) 0 0;
  display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.demo-cards--more { margin-top: var(--sp-4); }
.demo-card {
  display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-5);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}
.demo-card p { color: var(--ink-2); font-size: var(--fs-small); line-height: var(--lh-body); flex: 1; }
.demo-card .btn { align-self: flex-start; }
.demo-card--plain { background: transparent; }
.demo-card--plain h3 { font-size: 18px; }

/* ---------- Заявка ---------- */
.demo-cta { padding: var(--section-y) 0; }
.demo-cta__in { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-5); flex-wrap: wrap; }
.demo-cta .demo-lead { margin-top: var(--sp-4); }

/* ---------- Подвал (копия из assets/site.css — demo его не подключает): знак ASM Family (И12 п.3, вариант 1 mockups/asm-family.html) ----------
   Рамка — currentColor: тёмно-синяя на светлой теме, светло-голубая на тёмной; стрелка — в своих цветах. */
.site-footer__brand { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
.asmf { --asmf-frame: #1d4d7a; display: block; flex: none; color: var(--asmf-frame); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .asmf { --asmf-frame: #8fc3ee; }
}
:root[data-theme="dark"] .asmf { --asmf-frame: #8fc3ee; }
.asmf__t { font-family: var(--font); fill: var(--ink); }
.asmf__r { fill: var(--asmf-frame); }
