/* ==========================================================================
   Shared chrome for the case-study demos.
   The frame is brand-dark; the product surface inside it is light, so each
   demo reads like a real storefront presented inside the portfolio.
   ========================================================================== */

:root {
  --d-bg: #0b0f17;
  --d-blue: #3f8fc4;
  --d-purple: #2f6f9e;
  --d-green: #15a06a;
  --d-amber: #b76e00;
  --d-ink: #121725;
  --d-ink-soft: #596078;
  --d-line: #e5e7f0;
  --d-surface: #ffffff;
  --d-canvas: #f6f7fb;
  --d-radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(143, 211, 255, .20), transparent 38%),
    radial-gradient(circle at 85% 4%, rgba(185, 251, 192, .12), transparent 34%),
    var(--d-bg);
  color: var(--d-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a { color: inherit; }
button, input, select { font: inherit; }

/* --- Demo frame bar ------------------------------------------------------ */

.demo-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: rgba(11, 15, 23, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .13);
  color: #edf2ff;
}

.demo-bar a.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .05);
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
}

.demo-bar a.back:hover { border-color: rgba(143, 211, 255, .45); }

.demo-bar .title {
  font-size: 14px;
  font-weight: 750;
  letter-spacing: -.01em;
}

.demo-bar .tag {
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--d-blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.demo-bar .hint {
  margin-left: auto;
  color: #a9b4cc;
  font-size: 12.5px;
}

/* --- Product surface ----------------------------------------------------- */

.stage {
  max-width: 1120px;
  margin: 26px auto 60px;
  padding: 0 20px;
}

.surface {
  background: var(--d-canvas);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 40px 110px rgba(0, 0, 0, .5);
}

.surface-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  background: var(--d-surface);
  border-bottom: 1px solid var(--d-line);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.logo i {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--d-blue), var(--d-purple));
}

.surface-body { padding: 22px; }

/* --- Shared atoms -------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--d-line);
  background: var(--d-surface);
  color: var(--d-ink);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.btn:hover { transform: translateY(-1px); border-color: #c3c8dd; }

.btn-primary {
  background: linear-gradient(135deg, var(--d-blue), var(--d-purple));
  border-color: transparent;
  color: #fff;
}

.btn-primary:disabled {
  background: #d3d7e6;
  color: #8d93aa;
  cursor: not-allowed;
  transform: none;
}

.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; }

.card {
  background: var(--d-surface);
  border: 1px solid var(--d-line);
  border-radius: var(--d-radius);
}

.muted { color: var(--d-ink-soft); }
.tiny { font-size: 12.5px; }

.pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
  background: #eef0f8;
  color: var(--d-ink-soft);
}

.pill.good { background: #e3f7ee; color: var(--d-green); }
.pill.warn { background: #fdf0dd; color: var(--d-amber); }

.note {
  margin-top: 18px;
  padding: 13px 16px;
  border-radius: var(--d-radius);
  border: 1px dashed rgba(143, 211, 255, .28);
  background: rgba(255, 255, 255, .04);
  color: #a9b4cc;
  font-size: 13px;
}

.note b { color: #edf2ff; }

@media (max-width: 620px) {
  .demo-bar .hint { width: 100%; margin-left: 0; }
  .stage { padding: 0 12px; margin-top: 16px; }
  .surface-body { padding: 16px; }
}
