/* ============ EMAIL GATE ============ */
.gate {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(33, 28, 23, 0.92);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.gate[hidden] { display: none; }
.gate-card {
  background: var(--cream); border-radius: var(--radius);
  padding: 44px 36px; max-width: 440px; width: 100%;
  box-shadow: var(--shadow-soft);
}
.gate-form { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.gate-form input, .gate-form select {
  padding: 13px 16px; border-radius: 10px; border: 1px solid var(--line);
  font-family: var(--font-body); font-size: .98rem; background: #fff;
  color: var(--ink);
}
.gate-form input:focus, .gate-form select:focus { outline: none; border-color: var(--gold); }
.gate-note { text-align: center; font-size: .78rem; color: var(--ink-soft); opacity: .7; margin: 14px 0 0; }

/* ============ DEMO PLAYER + LIST ============ */
.demo-hero { padding-bottom: 32px; }
.demo-library { padding-top: 0; }
.demo-disclosure { text-align: center; font-size: .8rem; color: var(--ink-soft); opacity: .7; margin: 20px 0 0; }

.demo-layout {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: start;
}

/* -- now-playing panel -- */
.demo-player {
  background: var(--charcoal); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-soft);
  position: sticky; top: 96px;
}
.demo-player-scene {
  position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--charcoal-soft);
}
.demo-player-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.demo-player-caption {
  position: absolute; left: 14px; bottom: 12px; z-index: 2;
  font-family: 'Courier New', monospace; color: #f0d9a8; font-size: .9rem;
  text-shadow: 0 1px 6px rgba(0,0,0,.5);
}
.demo-controls {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.45) 60%, rgba(0,0,0,0) 100%);
  padding: 18px 10px 6px;
}
.demo-seek {
  -webkit-appearance: none; appearance: none; width: 100%; height: 4px;
  margin: 0 0 6px; background: rgba(255,255,255,.3); border-radius: 2px;
  accent-color: var(--gold); cursor: pointer;
}
.demo-seek::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%;
  background: var(--gold); cursor: pointer;
}
.demo-seek::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%; border: none;
  background: var(--gold); cursor: pointer;
}
.demo-controls-row { display: flex; align-items: center; gap: 6px; }
.demo-ctrl-btn {
  border: none; background: transparent; color: #fff; cursor: pointer;
  width: 32px; height: 32px; padding: 6px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s ease; flex-shrink: 0;
}
.demo-ctrl-btn:hover { background: rgba(255,255,255,.15); }
.demo-ctrl-btn svg { width: 100%; height: 100%; fill: currentColor; }
.demo-time { color: #eee; font-size: .78rem; font-family: 'Courier New', monospace; flex-shrink: 0; }
.demo-controls-spacer { flex: 1; }
.demo-player-info { padding: 20px 22px 24px; }
.demo-player-family { font-size: .78rem; color: var(--gold-bright); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.demo-player-title { font-family: var(--font-display); font-size: 1.4rem; color: #f4ecdd; margin: 6px 0 8px; }
.demo-player-desc { color: #a89a83; font-size: .95rem; margin: 0; }

.demo-who { margin-top: 14px; }
.demo-who summary {
  cursor: pointer; font-size: .85rem; font-weight: 600; color: var(--gold-bright);
  list-style: none; display: flex; align-items: center; gap: 6px;
}
.demo-who summary::-webkit-details-marker { display: none; }
.demo-who summary::before { content: "▸"; font-size: .75rem; transition: transform .15s ease; }
.demo-who[open] summary::before { transform: rotate(90deg); }
.demo-who-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.demo-who-list li { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: #cbbfa8; }
.demo-who-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.demo-who-dot-plain { background: #6b5f4f; }
.demo-who-chapters { color: #8a7d68; font-size: .8rem; }

/* -- search + list column -- */
.demo-search-row { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.demo-search {
  flex: 1; min-width: 200px;
  padding: 13px 18px; border-radius: 999px; border: 1px solid var(--line);
  font-family: var(--font-body); font-size: .96rem; background: #fff;
}
.demo-search:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(185,129,47,.15); }
.demo-search-count { font-size: .85rem; color: var(--ink-soft); white-space: nowrap; }
.demo-empty { text-align: center; color: var(--ink-soft); padding: 30px 0; }

.demo-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 640px; overflow-y: auto; }
.demo-list-item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 12px 14px; border-radius: 10px; cursor: pointer;
  transition: background .15s ease; border: 1px solid transparent;
}
.demo-list-item:hover { background: var(--cream-deep); }
.demo-list-item.active { background: var(--cream-deep); border-color: var(--gold); }
.demo-list-item[hidden] { display: none; }
.demo-list-item.needs-review .demo-list-title { color: #b3421f; }
.demo-list-time { font-family: 'Courier New', monospace; color: var(--gold); font-size: .82rem; flex-shrink: 0; padding-top: 2px; }
.demo-list-family { font-size: .72rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.demo-list-title { font-weight: 600; font-size: .95rem; color: var(--ink); margin-top: 2px; }
.demo-list-duration { font-family: 'Courier New', monospace; color: var(--ink-soft); font-size: .78rem; flex-shrink: 0; margin-left: auto; padding-top: 2px; white-space: nowrap; }

.demo-chapters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.demo-chapter-pill {
  font-family: var(--font-body); font-size: .82rem; font-weight: 600;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); cursor: pointer; transition: all .15s ease;
}
.demo-chapter-pill:hover { border-color: var(--gold); color: var(--gold); }
.demo-chapter-pill .demo-chapter-time { color: var(--ink-soft); font-family: 'Courier New', monospace; font-size: .74rem; margin-right: 6px; }
.demo-chapter-pill:hover .demo-chapter-time { color: var(--gold); }

@media (max-width: 880px) {
  .demo-layout { grid-template-columns: 1fr; }
  .demo-player { position: static; }
}
