/* FrameFlow Demo — minimal, premium, performance-safe. */

:root {
  --bg: #0b0b10;
  --panel: rgba(255, 255, 255, 0.04);
  --panel2: rgba(255, 255, 255, 0.06);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.62);
  --line: rgba(255, 255, 255, 0.1);
  --shadow: 0 22px 80px rgba(0, 0, 0, 0.55);
  --r: 18px;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Helvetica,
    Arial;
  background:
    radial-gradient(
      1200px 650px at 30% 10%,
      rgba(122, 80, 255, 0.14),
      transparent 55%
    ),
    radial-gradient(
      900px 520px at 80% 30%,
      rgba(0, 210, 255, 0.1),
      transparent 55%
    ),
    var(--bg);
  color: var(--text);
}

.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 18px 32px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.hero__text {
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-size: 38px;
  line-height: 1.05;
}

.subtitle {
  margin: 8px 0 0;
  font-size: 16px;
  color: var(--muted);
}

.lede {
  margin: 14px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
  max-width: 70ch;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.tags li {
  font-size: 12px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.78);
}

.demo {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.demo__frame {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: #05050a;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9; /* JS may update after first decode */
}

.stage {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: translateZ(0);
}

.hud {
  position: absolute;
  inset: 12px 12px auto 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.hud__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.badge {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.progress {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.progress__bar {
  width: 0%;
  height: 100%;
  background: rgba(255, 255, 255, 0.75);
  transform-origin: left center;
}

.demo__meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.meta__block {
  padding: 14px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.03);
}

.meta__block h2 {
  font-size: 14px;
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.9);
}

.bullets {
  margin: 0;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  line-height: 1.55;
}

.mono {
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}

.footer {
  margin-top: 18px;
  padding: 10px 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Responsive */
@media (min-width: 980px) {
  .hero {
    grid-template-columns: 1fr 1.08fr;
    align-items: start;
  }
  h1 {
    font-size: 44px;
  }
  .demo__meta {
    grid-template-columns: 1fr 1fr;
  }
}

/* Accessibility: reduce motion */
@media (prefers-reduced-motion: reduce) {
  .progress__bar {
    transition: none;
  }
}
.demo__frame {
  cursor: pointer;
}

.stage:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 4px;
  border-radius: 14px;
}
