/* gen-video-site design system — warm dark theme, accessible, responsive. */

:root {
  --bg: #0f1115;
  --bg-raised: #181b21;
  --bg-sunken: #0a0c10;
  --color: #e8e6e1;
  --muted: #9aa0a8;
  --accent: #f2a33c;
  --accent-2: #4cc3ff;
  --border: #2a2e36;
  --good: #6fce7e;
  --warn: #e6b45c;
  --radius: 10px;
  --font-display: Georgia, "Times New Roman", serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--color);
  font-family: var(--font-body);
  line-height: 1.55;
}

a { color: var(--accent-2); }
a:hover, a:focus-visible { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.skip-link {
  position: absolute;
  inset-block-start: 0.5rem;
  inset-inline-start: 0.5rem;
  padding: 0.5rem 0.9rem;
  background: var(--accent);
  color: #111;
  border-radius: 6px;
  transform: translateY(-200%);
  z-index: 50;
}
.skip-link:focus { transform: none; }

.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-raised);
}
.brand { font-family: var(--font-display); font-size: 1.15rem; color: var(--color); text-decoration: none; }
.site-header nav ul { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: 0; padding: 0; }
.site-header nav a {
  display: inline-block;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
}
.site-header nav a[aria-current="page"], .site-header nav a:hover {
  color: var(--color);
  border-color: var(--accent);
}

main { max-width: 860px; margin: 0 auto; padding: 1.4rem 1.2rem 3rem; }

h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0.2rem 0 0.4rem; }
.blurb { color: var(--muted); max-width: 62ch; margin: 0 0 1.2rem; }

/* --- the stage: video + overlays --- */
.stage {
  position: relative;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
video {
  display: block;
  width: 100%;
  height: auto; /* intrinsic 16:9 via width/height attrs → no CLS */
  background: #000;
}
.hotspot-layer { position: absolute; inset: 0; pointer-events: none; }
.hotspot {
  position: absolute;
  border: 2px solid var(--accent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  cursor: pointer;
  padding: 0;
  pointer-events: auto;
  animation: hotspot-pulse 1.2s ease-in-out infinite;
}
.hotspot:hover, .hotspot:focus-visible { background: color-mix(in srgb, var(--accent) 34%, transparent); }
/* Hovered state — SOLID, non-animated, high-contrast: freezes the pulse, adds an opaque fill,
   a >=2px solid light border + white outline, and a visible label. Driven by the app's real
   pointerenter/pointerleave handlers (data-hovered), never fabricated. */
.hotspot[data-hovered="true"] {
  animation: none;
  border: 3px solid var(--color);
  background: color-mix(in srgb, var(--accent) 78%, transparent);
  outline: 3px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
  z-index: 6;
}
.hotspot[data-hovered="true"]::after {
  content: attr(aria-label);
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 8px;
  padding: 4px 10px;
  background: var(--bg-sunken);
  color: var(--color);
  border: 2px solid var(--accent);
  border-radius: 4px;
  font: 700 12px/1.4 var(--font-body);
  white-space: nowrap;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
@keyframes hotspot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); }
  50% { box-shadow: 0 0 0 10px transparent; }
}

.prompt-readout {
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--bg-raised);
  font-size: 0.92rem;
}
.prompt-label {
  display: inline-block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-inline-end: 0.5rem;
}
.prompt-readout p { margin: 0.2rem 0 0; }

/* --- reveal dialog --- */
.reveal-dialog {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-raised);
  color: var(--color);
  padding: 1.2rem;
  max-width: 26rem;
  width: min(90vw, 26rem);
}
.reveal-dialog::backdrop { background: rgba(0, 0, 0, 0.55); }
.reveal-dialog h2 { margin: 0 0 0.5rem; font-family: var(--font-display); }
.reveal-dialog .reveal-body { color: var(--muted); margin: 0 0 0.9rem; }
.reveal-links { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.reveal-link { padding: 0.45rem 0.7rem; border: 1px solid var(--border); border-radius: 8px; text-decoration: none; color: var(--accent-2); }
.reveal-link:hover { border-color: var(--accent); color: var(--accent); }
.reveal-dialog menu { display: flex; justify-content: flex-end; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.reveal-dialog button {
  font: inherit;
  padding: 0.45rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #16130d;
  cursor: pointer;
}
.reveal-dialog button:hover { filter: brightness(1.08); }

/* --- fallback (noscript) --- */
.fallback { padding: 1rem; border: 1px dashed var(--border); border-radius: var(--radius); }
.fallback .prompt-section { margin-bottom: 1rem; }
.fallback .prompt-section a { margin-inline-end: 0.8rem; }

/* --- index page --- */
.demo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.demo-list a {
  display: block;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-raised);
  text-decoration: none;
  color: var(--color);
}
.demo-list a:hover { border-color: var(--accent); }
.demo-list .demo-desc { color: var(--muted); font-size: 0.88rem; }

footer {
  padding: 1.2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 560px) {
  .site-header { justify-content: center; }
  main { padding-inline: 0.8rem; }
}

/* --- per-prompt links bar (SPA #t= deep links, MPA nav, back) --- */
.prompt-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--bg-sunken);
}
.prompt-link {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.85rem;
}
.prompt-link:hover, .prompt-link:focus-visible {
  background: var(--accent);
  color: #16130d;
}

/* --- source site line (real Paul site context) --- */
.source-line {
  margin: -0.6rem 0 1.1rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.source-line a { color: var(--accent-2); }
