/* ── COLLAB PROTOTYPES (collab.js) — #together + #context ──────────────────
   Self-contained stylesheet so the sections are easy to keep or kill.
   Tile chrome is REAL APP PIXELS: frame_*.png rendered by `make
   landing-tiles` (TileFrame + HoloTheme in a widget test); the DOM only
   draws the live animated content inside the body area. Drag boxes reuse
   .dragbox, cursor-chat reuses .mp-bub from styles.css. */

/* The app's actual fonts, so DOM-drawn tile content matches the real
   renders around it (Geist is OFL; files copied from the pinned
   ffdesigner_ds checkout by `make landing-tiles` tooling). */
@font-face {
  font-family: "GeistVariable";
  src: url("./assets/fonts/GeistVariable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "GeistMonoVariable";
  src: url("./assets/fonts/GeistMonoVariable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

.collab {
  max-width: none;
  padding: 94px 0 104px;
  overflow: hidden;
}
.collab-head {
  width: min(100% - 48px, 920px);
  margin: 0 auto 36px;
  text-align: center;
}
.collab-eyebrow {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 12px;
  color: var(--fg-weak);
  margin: 0 0 14px;
}
.collab h2 {
  margin: 0 0 16px;
  font-size: 48px;
  line-height: 1.05;
  font-weight: 720;
}
.collab-sub {
  margin: 0 auto;
  max-width: 660px;
  color: var(--fg-muted);
  font-size: 18px;
  line-height: 1.55;
}
.collab-stage {
  position: relative;
  width: min(100% - 48px, 1160px);
  margin: 34px auto 0;
  overflow: hidden;
  border: 1px solid var(--stroke);
  border-radius: 20px;
  background:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.12) 1.1px, transparent 1.2px) 0 0 / 44px 44px,
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
}
.collab-cap {
  margin: 16px auto 0;
  max-width: 720px;
  text-align: center;
  color: var(--fg-weak);
  font-size: 13.5px;
  line-height: 1.6;
}
.collab-cap code {
  font: 12px/1 "SF Mono", Menlo, monospace;
  color: var(--fg-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--stroke);
  border-radius: 6px;
  padding: 2px 6px;
}

/* world: fixed-size coordinate space, scaled to the stage width */
.cw-world {
  position: absolute;
  left: 50%;
  top: 0;
  transform-origin: top center;
  will-change: transform, opacity;
}
.cw-tile {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
}
.cw-tile .tile { height: auto; }
.cw-tile .tile-bar { cursor: default; }

/* real-chrome tiles: the PNG (real TileFrame render, 2x, alpha) is the
   whole chrome; .cw-tilebody overlays live content below the 40px bar */
.cw-tile.cw-real .cw-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5); /* clipped out of the capture */
}
.cw-tile.cw-real .cw-tilebody {
  position: absolute;
  left: 1px;
  right: 1px;
  top: 40px;
  bottom: 1px;
  overflow: hidden;
  border-radius: 0 0 16px 16px;
  padding: 12px 14px;
  font-family: "GeistVariable", "SF Pro Display", system-ui, sans-serif;
}
.cw-tile.cw-real.dragging { filter: brightness(1.07); }
.cw-mono,
.cw-tile.cw-real .term-lite {
  font-family: "GeistMonoVariable", "SF Mono", Menlo, monospace;
}
.cw-tile.cw-real .cw-webbody { padding: 8px 10px; }

/* ── floating Campus toolbar (room · presence · share) ─────────────────────*/
.cw-bar {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(18, 18, 22, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
}
.cw-logo { display: grid; place-items: center; width: 18px; height: 18px; color: var(--fg-muted); }
.cw-logo svg { width: 15px; height: 15px; }
.cw-room {
  font: 600 12.5px/1 "SF Pro Display", system-ui, sans-serif;
  color: var(--fg);
  letter-spacing: 0.2px;
}
.cw-sep { width: 1px; height: 16px; background: var(--stroke); }
.cw-presence { display: flex; align-items: center; }
.cw-presence i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  margin-left: -6px;
  border: 2px solid #16161a;
  background: var(--a, var(--purple));
  color: #fff;
  font: 700 10px/1 "SF Pro Display", system-ui, sans-serif;
  transform-origin: center;
}
.cw-presence i:first-child { margin-left: 0; }
.cw-presence .cw-av-s,
.cw-presence .cw-av-c { transform: scale(0); }
.cw-presence .cw-av-c {
  background: #23232c;
  border-color: rgba(143, 136, 255, 0.55);
  color: #cfc9ff;
  font-size: 11px;
}
.cw-share {
  appearance: none;
  border: 0;
  cursor: default;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--purple);
  color: #fff;
  font: 600 11.5px/1 "SF Pro Display", system-ui, sans-serif;
  transform-origin: center;
}
.cw-share.is-hot { filter: brightness(1.18); }
.cw-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  font: 11px/1 "SF Mono", Menlo, monospace;
  color: var(--fg-muted);
  border: 1px dashed color-mix(in srgb, var(--purple) 55%, var(--stroke));
  border-radius: 999px;
  padding: 5px 10px;
}
.cw-link b {
  font: 700 10px/1 "SF Pro Display", system-ui, sans-serif;
  color: var(--green);
  opacity: 0;
}

/* ── join toast ─────────────────────────────────────────────────────────────*/
.cw-toast {
  position: absolute;
  top: 64px;
  right: 18px;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(18, 18, 22, 0.88);
  font: 500 12.5px/1 "SF Pro Display", system-ui, sans-serif;
  color: var(--fg);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
  opacity: 0;
  will-change: transform, opacity;
}
.cw-toast i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
}
.cw-toast.is-agent i { background: #8f88ff; }

/* ── cursors (world-space peers; .is-agent is the badged Claude cursor) ────*/
.cw-cur {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 20;
  pointer-events: none;
  will-change: transform, opacity;
}
.cw-cur svg {
  display: block;
  width: 15px;
  height: 19px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}
.cw-pill {
  position: absolute;
  left: 12px;
  top: 13px;
  padding: 2px 7px;
  border-radius: 6px;
  font: 600 10.5px/1.3 "SF Pro Display", system-ui, sans-serif;
  color: #fff;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.cw-pill.is-agent {
  background: #23232c;
  border: 1px solid rgba(143, 136, 255, 0.55);
  color: #e6e3ff;
}

/* drag boxes reuse .dragbox visuals but live in world space */
.cw-dragbox {
  position: absolute;
  z-index: 14;
  opacity: 0;
}

/* bubbles reuse .mp-bub; keep them above tiles in world space */
.cw-bub { z-index: 22; }

/* agent-typed scratchpad lines */
.cw-typed { display: none; }
.cw-typed.is-on { display: list-item; }

/* ── scene B: claude terminal body ─────────────────────────────────────────*/
.cw-term,
.cw-tile.cw-real .cw-tilebody.cw-term {
  font: 13px/1.8 "GeistMonoVariable", "SF Mono", Menlo, monospace;
  color: var(--fg);
}
.cw-term .cw-l { margin: 0; display: none; }
.cw-term .cw-l.is-on { display: block; }
.cw-term .cw-you b { color: var(--teal); font-weight: 700; }
.cw-term .cw-spin { color: var(--fg-muted); }
.cw-term .cw-spin.ok { color: var(--green); }
.cw-term .cw-line { color: var(--fg-muted); }
.cw-term .cw-line.ok { color: var(--green); }
.cw-term .cw-verb { color: var(--fg-weak); }
.cw-term .cw-verb b { color: var(--purple); font-weight: 700; }
.cw-caret {
  display: inline-block;
  width: 7px;
  height: 14px;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--fg-muted);
  animation: cw-caret 1.05s steps(1) infinite;
}
@keyframes cw-caret {
  0%, 50% { opacity: 0.9; }
  50.01%, 100% { opacity: 0; }
}

/* ── scene B: mini checkout page inside the webview tile ───────────────────*/
.cw-shop {
  padding: 16px 18px 18px;
  background: linear-gradient(135deg, #171922, #101116);
}
.cw-shop-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.cw-sw {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #262a38;
}
.cw-sw.sm { width: 26px; height: 26px; margin-left: 4px; }
.cw-shop-row span {
  flex: 1;
  height: 10px;
  border-radius: 5px;
  background: #232633;
}
.cw-shop-row:nth-child(2) span { max-width: 60%; }
.cw-cta {
  appearance: none;
  border: 0;
  cursor: default;
  display: block;
  margin-top: 14px;
  margin-left: 72%;
  width: 54px;
  height: 20px;
  overflow: hidden;
  white-space: nowrap;
  border-radius: 7px;
  background: var(--teal);
  color: #eafcff;
  font: 700 9px/1 "SF Pro Display", system-ui, sans-serif;
  text-align: left;
  padding: 0 5px;
  outline: 1px dashed rgba(224, 108, 117, 0.75);
  outline-offset: 3px;
  transition: all 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.cw-cta.is-fixed {
  margin-left: 0;
  width: 100%;
  height: 36px;
  font-size: 13px;
  padding: 0;
  text-align: center;
  border-radius: 11px;
  outline-color: transparent;
}

/* ── scene B: CLI chip riding the agent cursor ─────────────────────────────*/
.cw-chip {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 19; /* under the cursor pill so "✦ Claude" stays readable */
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 9px;
  border: 1px solid color-mix(in srgb, var(--purple) 40%, var(--stroke));
  background: rgba(20, 20, 26, 0.92);
  font: 11px/1.2 "SF Mono", Menlo, monospace;
  color: #cfd2e0;
  white-space: nowrap;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  opacity: 0;
  will-change: transform, opacity;
}
.cw-chip b { color: var(--purple); }

/* ── scene B: the card the agent drags Now → Done ──────────────────────────*/
.cw-card {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 18;
  padding: 7px 11px;
  border-radius: 9px;
  border: 1px solid color-mix(in srgb, var(--orange) 45%, var(--stroke));
  background: #1d1e26;
  font: 500 12px/1 "SF Pro Display", system-ui, sans-serif;
  color: var(--fg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  will-change: transform, opacity;
}

@media (max-width: 720px) {
  .collab h2 { font-size: 34px; }
}
