/* headsupp.ai/c/<clip>: one clip's page (r32b; functions/c/[[path]].js + /assets/clip.js).
   Mobile first: a full-height, phone-width column (max 480px) centred on a dark
   backdrop. One page, two views: the landing (#top) and the full-screen player
   (#watch), which :target shows without JS. Tokens come from site.css.
   No inline styles anywhere (CSP style-src 'self'). */

:root { color-scheme: dark; }
html, body { background: #050506; min-height: 100%; }
body.clip-page { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }

main.col {
  position: relative; max-width: 480px; margin: 0 auto; padding: 0;
  min-height: 100vh; min-height: 100dvh; background: #000; overflow: hidden;
}
@media (min-width: 520px) {
  main.col { box-shadow: 0 0 0 1px #1c1c22, 0 24px 80px rgba(0, 0, 0, .7); }
}

a:focus-visible, button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ---------- buttons ---------- */
.btn {
  display: block; width: 100%; padding: 14px 18px; border-radius: 999px;
  font-size: 16px; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none;
}
.btn + .btn { margin-top: 10px; }
.btn.primary { background: var(--accent); color: #04140a; }
.btn.secondary { background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .24); }
.btn.primary:active, .btn.secondary:active { opacity: .85; }

/* ---------- landing ---------- */
.landing { position: relative; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.landing .backdrop { position: absolute; inset: 0; background: linear-gradient(180deg, #1b1b22 0%, #000 100%); }
.landing .backdrop img { display: block; width: 100%; height: 100%; object-fit: cover; filter: brightness(.5); }
.landing .backdrop::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, 0) 18%, rgba(0, 0, 0, 0) 42%, rgba(0, 0, 0, .88) 72%, #000 100%);
}
.bar {
  position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
}
.wordmark { color: #fff; font-size: 20px; font-weight: 800; letter-spacing: -.01em; text-decoration: none; }
.ai-pill {
  padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .5);
  border: 1px solid rgba(255, 255, 255, .4); color: #fff; font-size: 13px; font-weight: 600;
}
.stage { position: relative; z-index: 1; flex: 1 1 auto; display: flex; align-items: center; justify-content: center; min-height: 160px; }
.play {
  display: flex; align-items: center; justify-content: center; width: 84px; height: 84px; border-radius: 50%;
  background: rgba(0, 0, 0, .45); border: 2px solid rgba(255, 255, 255, .85); color: #fff;
}
.play svg { margin-left: 5px; }
.pitch { position: relative; z-index: 1; padding: 0 20px calc(18px + env(safe-area-inset-bottom, 0px)); text-align: center; }
.pitch h1 { margin: 0 0 18px; color: #fff; font-size: 24px; line-height: 1.25; }
.disclose { margin: 16px 0 0; color: rgba(255, 255, 255, .72); font-size: 13px; line-height: 1.45; }
.links { margin: 10px 0 0; color: rgba(255, 255, 255, .55); font-size: 13px; }
.links a { color: rgba(255, 255, 255, .82); }

/* ---------- player (#watch) ---------- */
.player {
  display: none; position: fixed; z-index: 10; top: 0; bottom: 0; left: 0; right: 0;
  width: 100%; max-width: 480px; margin: 0 auto; background: #000; overflow: hidden;
}
.player:target, .player.is-open { display: block; }
/* The top strip sits above the video, so the controls never cover the
   burned-in "HeadsUpp" / "AI twin" labels in the video's top corners;
   object-fit: contain never crops them either. */
.player .top {
  position: absolute; z-index: 3; top: 0; left: 0; right: 0; height: calc(56px + env(safe-area-inset-top, 0px));
  display: flex; align-items: center; justify-content: space-between; padding: env(safe-area-inset-top, 0px) 12px 0;
}
.player video {
  position: absolute; top: calc(56px + env(safe-area-inset-top, 0px)); left: 0; right: 0;
  width: 100%; height: calc(100% - 56px - env(safe-area-inset-top, 0px)); object-fit: contain; background: #000;
}
.close {
  display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255, 255, 255, .12); color: #fff;
}
.sound {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, .14); color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.sound[hidden] { display: none; }
.sound .on { display: none; }
.sound[aria-pressed="true"] .on { display: inline; }
.sound[aria-pressed="true"] .off { display: none; }
.paused-glyph {
  display: none; position: absolute; z-index: 2; top: 50%; left: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px;
  align-items: center; justify-content: center; border-radius: 50%; background: rgba(0, 0, 0, .45); color: #fff; pointer-events: none;
}
.paused-glyph svg { margin-left: 5px; }
.player.is-paused .paused-glyph { display: flex; }
.overlay {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: 0;
  padding: 64px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(0deg, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .62) 55%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none; text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}
.overlay > * { pointer-events: auto; }
.who { display: flex; align-items: center; gap: 8px; margin: 0; }
.who img { flex: none; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(255, 255, 255, .3); }
.who .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; font-weight: 700; text-decoration: none; }
.who .tick { flex: none; }
.caption {
  margin: 8px 0 14px; color: #fff; font-size: 15px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.who + .btn { margin-top: 14px; }
.overlay .btn { text-shadow: none; }
