/* Shared layout for /demos/<slug>/ pages. Builds on room.css tokens. */
body.demo-page { min-height: 100svh; display: flex; flex-direction: column; }
.dtop { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; padding: 12px var(--gutter); border-bottom: 1px solid var(--line); background: rgba(6,7,8,.78); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); }
.dtop .back { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--mute); white-space: nowrap; }
.dtop .back:hover { color: var(--bone); }
.dtop .ttl { font-family: var(--serif); font-weight: 340; font-size: 22px; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dtop .chips { display: flex; gap: 6px; margin-left: auto; align-items: center; flex-wrap: nowrap; }
.kchip { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--mute); white-space: nowrap; }
.kchip.cam { color: #93e8ff; border-color: rgba(95,225,255,.35); }
.kchip.footage { color: #7fe3ab; border-color: rgba(79,208,138,.35); }
.kchip.sim { color: #ffcb7d; border-color: rgba(255,181,71,.35); }
.dtop .info-toggle { height: 34px; padding: 0 12px; font-size: 12.5px; }

.demo { flex: 1; display: grid; grid-template-columns: 1fr 380px; min-height: 0; }
.demo.info-closed { grid-template-columns: 1fr 0; }
.demo.info-closed .demo-info { display: none; }
.demo-stage { position: relative; min-height: calc(100svh - 59px); overflow: hidden; background: #050607; }
.demo-info { border-left: 1px solid var(--line); padding: 24px 22px 40px; overflow: auto; max-height: calc(100svh - 59px); position: sticky; top: 59px; display: flex; flex-direction: column; gap: 22px; }
.demo-info h1 { font-family: var(--serif); font-weight: 320; font-size: 38px; letter-spacing: -0.02em; line-height: 1; margin: 0; }
.demo-info .lede { color: var(--mute); font-size: 15px; margin: 0; line-height: 1.5; }
.demo-info h4 { margin: 0 0 6px; font-family: var(--mono); font-size: 10.5px; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; color: var(--mute-2); }
.demo-info p, .demo-info li { font-size: 14px; line-height: 1.55; color: rgba(243,239,231,.82); margin: 0; }
.demo-info ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.demo-info .needs { display: flex; flex-wrap: wrap; gap: 6px; }
.demo-info .needs span { font-size: 12px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--mute); }
.demo-info .honest { font-size: 12.5px; color: var(--mute); border-left: 2px solid rgba(255,181,71,.5); padding-left: 10px; }

/* Full-bleed media inside the stage */
.fill { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mirror-x { transform: scaleX(-1); }

/* Start screen used by camera demos */
.start { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; text-align: center; padding: 24px; background: radial-gradient(70% 70% at 50% 40%, rgba(17,21,26,.92), rgba(5,6,7,.97)); }
.start h2 { font-family: var(--serif); font-weight: 320; font-size: clamp(40px, 6vw, 84px); letter-spacing: -0.03em; line-height: .95; margin: 0 0 14px; }
.start h2 em { font-style: italic; }
.start p { color: var(--mute); max-width: 460px; margin: 0 auto 26px; font-size: 16px; }
.start .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.start .fine { margin-top: 18px; }

/* HUD primitives for demos */
.hud { position: absolute; z-index: 10; pointer-events: none; }
.hud-tl { top: 18px; left: 18px; } .hud-tr { top: 18px; right: 18px; } .hud-bl { bottom: 18px; left: 18px; } .hud-br { bottom: 18px; right: 18px; }
.hud-top { top: 18px; left: 18px; right: 18px; } .hud-bottom { bottom: 18px; left: 18px; right: 18px; }
.stat { padding: 14px 16px; min-width: 120px; }
.stat label { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.stat b { display: block; font-size: 34px; font-weight: 400; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.big-num { font-size: clamp(80px, 12vw, 180px); font-weight: 300; letter-spacing: -0.06em; line-height: .85; font-variant-numeric: tabular-nums; }
.toast { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 15; font-family: var(--serif); font-style: italic; font-weight: 300; font-size: clamp(36px, 6vw, 92px); pointer-events: none; text-shadow: 0 0 40px rgba(255,181,71,.55); opacity: 0; }
.toast.pop { animation: combo 1.4s var(--ease); }

/* Next / previous */
.dnext { border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; }
.dnext a { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; padding: 18px var(--gutter); transition: background .3s; }
.dnext a:hover { background: rgba(243,239,231,.03); }
.dnext a + a { border-left: 1px solid var(--line); }
.dnext img { width: 120px; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.dnext small { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute-2); }
.dnext b { font-weight: 500; font-size: 16px; }
.dnext span { display: block; font-size: 13px; color: var(--mute); margin-top: 2px; }

@media (max-width: 960px) {
  .demo, .demo.info-closed { grid-template-columns: 1fr; }
  .demo-stage { min-height: 72svh; }
  .demo-info { position: static; max-height: none; border-left: 0; border-top: 1px solid var(--line); }
  .demo.info-closed .demo-info { display: flex; }
  .dtop .info-toggle { display: none; }
  .dtop .chips .kchip.h, .dtop .chips .needs-chip { display: none; }
  .dnext { grid-template-columns: 1fr; }
  .dnext a + a { border-left: 0; border-top: 1px solid var(--line); }
  .dnext a { grid-template-columns: 88px 1fr; }
  .dnext img { width: 88px; }
}
@media (max-width: 560px) { .dtop .ttl { font-size: 18px; } .stat b { font-size: 26px; } .stat { min-width: 0; padding: 10px 12px; } }

.notes-more { border-top: 1px solid var(--line); padding-top: 14px; }
.notes-more summary { cursor: pointer; list-style: none; font-size: 13.5px; color: var(--bone); display: flex; align-items: center; gap: 8px; }
.notes-more summary::-webkit-details-marker { display: none; }
.notes-more summary::before { content: "+"; font-family: var(--mono); width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; font-size: 12px; }
.notes-more[open] summary::before { content: "−"; }
.notes-more > div { margin-top: 16px; }
.dnext-cta { display: flex; justify-content: center; gap: 10px; padding: 28px var(--gutter) 36px; border-top: 1px solid var(--line); flex-wrap: wrap; }
