/* Reallytics CSR demo screen. Tokens mirror shared/brand/tokens.css. */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap");

:root {
  --ink: #141012; --ink-2: #3d3437; --muted: #6f6467; --line: #ece6e7; --soft: #f7f5f5;
  --grad: linear-gradient(100deg, #ff5a36 0%, #ff2a3d 38%, #d40f3c 68%, #7d0a35 100%);
  --pill: 999px; --radius: 16px; --radius-lg: 22px;
  --shadow: 0 24px 50px -24px rgba(20, 16, 18, .35);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --gutter: 40px;
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif; color: var(--ink-2); background: var(--soft);
  display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

/* Slim brand header */
.bar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  height: 64px; padding: 0 var(--gutter); background: #fff; border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.back { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink); min-width: 0; }
.back svg { width: 18px; height: 18px; flex-shrink: 0; }
.back span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lockup img { height: 28px; width: auto; display: block; }
.book { justify-self: end; padding: 10px 20px; border-radius: var(--pill); background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap; }
.book:hover { background: #0c0a0b; }

/* Demo screen */
.demo { flex: 1; display: flex; flex-direction: column; gap: 16px; padding: 24px var(--gutter) var(--gutter); max-width: 1680px; width: 100%; margin: 0 auto; min-height: 0; }
.demo-top { display: flex; flex-direction: column; gap: 16px; animation: rise .5s var(--ease) both; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
h1 { font-size: clamp(1.6rem, 2.6vw, 2.4rem); font-weight: 600; letter-spacing: -0.03em; color: var(--ink); line-height: 1.15; }
.accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--grad); }
.live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--grad); animation: ping 1.8s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .6; } 80%, 100% { transform: scale(2.6); opacity: 0; } }

.demo-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.demo-tabs::-webkit-scrollbar { display: none; }
.demo-tab {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  font-family: inherit; text-align: left; cursor: pointer; transition: border-color .2s, box-shadow .2s;
}
.demo-tab:hover { border-color: #d9d0d2; }
.demo-tab.active { border-color: transparent; background: linear-gradient(#fff, #fff) padding-box, var(--grad) border-box; box-shadow: 0 10px 30px -18px rgba(20, 16, 18, .3); }
.tab-title { font-weight: 600; color: var(--ink); font-size: 14px; }
.tab-meta { font-size: 12px; color: var(--muted); }

.try { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.try-label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 8px; }
.chip { padding: 8px 16px; border-radius: var(--pill); background: #fff; border: 1px solid var(--line); font-size: 13px; color: var(--ink); }

.demo-wrap { flex: 1; min-height: 600px; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.demo-wrap iframe { width: 100%; height: 100%; min-height: 600px; border: 0; display: block; }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .bar { height: 56px; grid-template-columns: 1fr auto; }
  .lockup { display: none; }
  .back { font-size: 13px; }
  .book { padding: 8px 16px; font-size: 13px; }
  .demo { padding-top: 16px; }
  .try-label { width: 100%; }
  .demo-wrap, .demo-wrap iframe { min-height: 760px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
