/* Embedded promo player (homepage) — inherits site theme tokens */
.promo-embed {
  --pe-bg: var(--bg-muted);
  --pe-card: var(--bg-card);
  --pe-text: var(--text);
  --pe-muted: var(--text-muted);
  --pe-accent: var(--accent);
  --pe-cyan: var(--accent);
  --pe-violet: var(--accent-hover);
  --pe-cta: var(--cta);
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 280px;
  max-height: 420px;
  border-radius: 16px;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(99, 102, 241, 0.15), transparent 60%), var(--pe-bg);
  border: 1px solid rgba(0, 180, 216, 0.25);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(148, 163, 184, 0.08);
}

.promo-embed-stage {
  position: absolute;
  inset: 0;
  bottom: 44px;
}

.promo-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 28px 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  text-align: center;
}

.promo-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.promo-slide h3 {
  margin: 0;
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  font-weight: 800;
  line-height: 1.35;
  color: var(--pe-text);
}

.promo-slide p {
  margin: 0.55rem 0 0;
  font-size: clamp(0.78rem, 1.5vw, 0.92rem);
  color: var(--pe-muted);
  line-height: 1.5;
  max-width: 92%;
}

.promo-hl { color: var(--pe-cyan); }
.promo-hl2 { color: var(--pe-violet); }
.promo-hl3 { color: var(--pe-cta); }

.promo-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--pe-accent), #818cf8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-en);
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  margin-bottom: 10px;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.promo-pain-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  width: 100%;
  max-width: 360px;
}

.promo-pain-item {
  flex: 1;
  background: var(--pe-card);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 10px;
  padding: 10px 8px;
  font-size: 0.72rem;
  color: var(--pe-muted);
  line-height: 1.35;
}

.promo-pain-item .ico { font-size: 1.2rem; display: block; margin-bottom: 4px; }

.promo-metrics {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.promo-metric .num {
  font-size: 1.25rem;
  font-weight: 900;
  font-family: var(--font-en);
  line-height: 1;
}

.promo-metric .lbl { font-size: 0.68rem; color: var(--pe-muted); margin-top: 2px; }

.promo-metric .num.c1 { color: var(--pe-cyan); }
.promo-metric .num.c2 { color: #34d399; }
.promo-metric .num.c3 { color: var(--pe-cta); }
.promo-metric .num.c4 { color: var(--pe-violet); }

.promo-mock {
  width: 100%;
  max-width: 340px;
  height: 72px;
  margin-top: 12px;
  border-radius: 8px;
  background: #1e293b;
  border: 1px solid rgba(148, 163, 184, 0.15);
  display: flex;
  overflow: hidden;
}

.promo-mock-side {
  width: 24%;
  background: #0f172a;
  padding: 8px;
}

.promo-mock-main { flex: 1; padding: 8px; display: flex; flex-direction: column; gap: 5px; }

.promo-bar {
  height: 5px;
  border-radius: 3px;
  background: rgba(148, 163, 184, 0.2);
}

.promo-bar.accent {
  background: linear-gradient(90deg, var(--pe-accent), var(--pe-cyan));
  width: 65%;
  animation: promoGrow 2s ease infinite;
}

.promo-timeline {
  display: flex;
  gap: 2px;
  margin-top: auto;
  height: 14px;
}

.promo-timeline span { flex: 1; border-radius: 2px; animation: promoPulse 2s ease infinite; }
.promo-timeline span:nth-child(1) { background: #f472b6; }
.promo-timeline span:nth-child(2) { background: #fbbf24; }
.promo-timeline span:nth-child(3) { background: #60a5fa; }
.promo-timeline span:nth-child(4) { background: #34d399; }

@keyframes promoGrow {
  0%, 100% { width: 45%; }
  50% { width: 80%; }
}

@keyframes promoPulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.promo-search-box {
  width: 100%;
  max-width: 300px;
  margin-top: 12px;
  text-align: left;
}

.promo-search-input {
  padding: 8px 12px;
  border-radius: 8px;
  border: 2px solid var(--pe-violet);
  background: var(--pe-card);
  color: var(--pe-text);
  font-size: 0.85rem;
  font-weight: 600;
}

.promo-search-hit {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--pe-card);
  border: 1px solid rgba(167, 139, 250, 0.25);
  font-size: 0.72rem;
  color: var(--pe-muted);
  animation: promoHit 4s ease infinite;
  opacity: 0;
}

.promo-search-hit strong { color: var(--pe-violet); }
.promo-search-hit:nth-child(2) { animation-delay: 0.9s; }

@keyframes promoHit {
  0%, 12% { opacity: 0; transform: translateX(-8px); }
  22%, 80% { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; }
}

.promo-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 12px;
  max-width: 360px;
}

.promo-tag {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  background: var(--pe-card);
  border: 1px solid rgba(148, 163, 184, 0.15);
  color: var(--pe-muted);
}

.promo-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(10, 18, 32, 0.92);
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  padding: 0 12px;
}

.promo-controls button {
  background: none;
  border: none;
  color: var(--pe-text);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
}

.promo-controls button:hover { background: rgba(99, 102, 241, 0.2); }

.promo-dots { display: flex; gap: 5px; }

.promo-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.3);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.promo-dot.is-active {
  background: var(--pe-accent);
  transform: scale(1.25);
}

.promo-timer {
  font-size: 0.68rem;
  color: var(--pe-muted);
  font-variant-numeric: tabular-nums;
  min-width: 36px;
}

.promo-embed-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.65rem;
  flex-wrap: wrap;
}

.promo-embed-caption {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.promo-embed-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.promo-embed-actions .btn-sm {
  font-size: 0.82rem;
  padding: 0.4rem 0.85rem;
}

.promo-embed--featured {
  aspect-ratio: 16 / 9;
  min-height: 300px;
  max-height: 420px;
  border-radius: 20px;
  border-width: 1px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 180, 216, 0.12);
}

.promo-embed--home {
  max-height: 380px;
}

.promo-embed--featured .promo-embed-stage {
  bottom: 52px;
}

.promo-embed--featured .promo-slide {
  padding: 32px 48px 16px;
}

.promo-embed--featured .promo-slide h3 {
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.promo-embed--featured .promo-slide p {
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  max-width: 720px;
}

.promo-embed--featured .promo-logo {
  width: 56px;
  height: 56px;
  font-size: 17px;
  border-radius: 14px;
  margin-bottom: 14px;
}

.promo-embed--featured .promo-pain-row {
  max-width: 520px;
  gap: 14px;
  margin-top: 20px;
}

.promo-embed--featured .promo-pain-item {
  padding: 14px 12px;
  font-size: 0.88rem;
  border-radius: 12px;
}

.promo-embed--featured .promo-pain-item .ico {
  font-size: 1.5rem;
}

.promo-embed--featured .promo-metrics {
  gap: 28px;
  margin-top: 18px;
}

.promo-embed--featured .promo-metric .num {
  font-size: 1.75rem;
}

.promo-embed--featured .promo-metric .lbl {
  font-size: 0.82rem;
}

.promo-embed--featured .promo-mock {
  max-width: 480px;
  height: 100px;
  margin-top: 18px;
  border-radius: 10px;
}

.promo-embed--featured .promo-search-box {
  max-width: 440px;
  margin-top: 18px;
}

.promo-embed--featured .promo-search-input {
  padding: 12px 16px;
  font-size: 1rem;
  border-radius: 10px;
}

.promo-embed--featured .promo-search-hit {
  padding: 10px 14px;
  font-size: 0.88rem;
  margin-top: 8px;
}

.promo-embed--featured .promo-tags {
  max-width: 480px;
  gap: 10px;
  margin-top: 16px;
}

.promo-embed--featured .promo-tag {
  padding: 7px 14px;
  font-size: 0.82rem;
}

.promo-embed--featured .promo-controls {
  height: 52px;
  gap: 14px;
}

.promo-embed--featured .promo-controls button {
  font-size: 0.85rem;
  padding: 6px 10px;
}

.promo-embed--featured .promo-dot {
  width: 9px;
  height: 9px;
}

@media (max-width: 960px) {
  .promo-embed--featured {
    aspect-ratio: 16 / 10;
    min-height: 300px;
    max-height: none;
  }

  .promo-embed--featured .promo-slide {
    padding: 24px 20px 12px;
  }
}


@media (prefers-reduced-motion: reduce) {
  .promo-slide { transition: none; }
  .promo-bar.accent,
  .promo-timeline span,
  .promo-search-hit { animation: none; }
  .promo-search-hit { opacity: 1; }
}

/* ---- Interactive try-search + story mode ---- */
.promo-mode-tabs {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  right: auto;
  z-index: 20;
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(10, 18, 32, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.promo-mode-btn {
  border: none;
  background: transparent;
  color: var(--pe-muted);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  letter-spacing: 0.04em;
}

.promo-mode-btn.is-active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(0, 180, 216, 0.25));
  color: var(--pe-text);
}

.promo-try-stage,
.promo-story-stage {
  display: none;
  position: absolute;
  inset: 0;
}

.promo-try-stage.is-active,
.promo-story-stage.is-active {
  display: block;
}

.promo-embed-stage--try {
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(1.5rem, 4vw, 2.25rem) clamp(1.75rem, 5vw, 2.5rem);
  gap: 0;
}

.promo-try-tagline {
  margin: 0 0 0.35rem;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 700;
  color: var(--pe-text);
}

.promo-try-tagline strong {
  color: var(--pe-cyan);
}

.promo-try-scene {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  color: var(--pe-muted);
  font-style: normal;
  max-width: 520px;
  line-height: 1.55;
}

.promo-try-form {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  max-width: 480px;
  margin-bottom: 0.65rem;
}

.promo-try-input {
  flex: 1;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 2px solid rgba(167, 139, 250, 0.45);
  background: var(--pe-card);
  color: var(--pe-text);
  font-size: 0.95rem;
  outline: none;
}

.promo-try-input:focus {
  border-color: var(--pe-cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}

.promo-try-submit {
  padding: 0.65rem 1.1rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--pe-accent), #818cf8);
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  white-space: nowrap;
}

.promo-try-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.promo-try-chip {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: var(--pe-card);
  color: var(--pe-muted);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.promo-try-chip:hover {
  border-color: var(--pe-cyan);
  color: var(--pe-cyan);
}

.promo-try-theater {
  width: 100%;
  max-width: 520px;
  min-height: 0;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s, transform 0.4s;
  text-align: left;
}

.promo-try-theater.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.promo-try-searching {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--pe-muted);
  padding: 0.75rem 0;
}

.promo-try-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(148, 163, 184, 0.3);
  border-top-color: var(--pe-cyan);
  border-radius: 50%;
  animation: promoSpin 0.8s linear infinite;
}

@keyframes promoSpin {
  to { transform: rotate(360deg); }
}

.promo-try-hit {
  text-align: left;
  padding: 0.85rem 1rem;
  background: var(--pe-card);
  border: 1px solid rgba(167, 139, 250, 0.35);
  border-radius: 10px;
  font-size: 0.82rem;
  color: var(--pe-muted);
}

.promo-try-hit.is-pulse {
  animation: promoHitPulse 0.6s ease;
}

@keyframes promoHitPulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.4); }
  70% { box-shadow: 0 0 0 12px rgba(34, 211, 238, 0); }
  100% { box-shadow: none; }
}

.promo-try-hit-file {
  display: block;
  font-weight: 700;
  color: var(--pe-text);
  margin-bottom: 0.25rem;
}

.promo-try-hit-time strong {
  color: var(--pe-violet);
}

.promo-try-hit-snippet {
  margin: 0.4rem 0 0;
  color: var(--pe-text);
  line-height: 1.45;
}

.promo-try-player {
  text-align: left;
}

.promo-try-player-bar {
  height: 6px;
  background: rgba(148, 163, 184, 0.2);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.promo-try-player-progress {
  display: block;
  width: 35%;
  height: 100%;
  background: linear-gradient(90deg, var(--pe-accent), var(--pe-cyan));
  border-radius: 3px;
  animation: promoProgress 1.2s ease forwards;
}

@keyframes promoProgress {
  from { width: 8%; }
  to { width: 42%; }
}

.promo-try-player-frame {
  padding: 1.25rem;
  background: #0f172a;
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--pe-cyan);
  text-align: center;
  margin-bottom: 0.5rem;
}

.promo-try-brand-action {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--pe-cta);
  text-align: center;
}

.promo-try-player-frame.is-seek {
  animation: promoSeekFlash 0.9s ease;
  border-color: var(--pe-cta);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
}

@keyframes promoSeekFlash {
  0%, 100% { background: #0f172a; }
  40% { background: rgba(245, 158, 11, 0.12); }
}

[data-theme="paper"] .promo-try-player-frame {
  background: var(--bg-elevated);
  color: var(--accent);
}

[data-theme="paper"] .promo-try-player-frame.is-seek {
  background: var(--cta-soft);
}

.promo-try-payoff {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--pe-cta);
}

.promo-try-invite {
  margin: 0;
  font-size: 0.92rem;
  color: var(--pe-text);
  line-height: 1.5;
}

.promo-try-invite strong {
  color: var(--pe-cyan);
}

/* Story slides */
.promo-story-role {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--pe-cta);
  text-transform: uppercase;
}

.promo-value-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  max-width: 400px;
  margin-top: 0.75rem;
}

.promo-value-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.85rem;
  background: var(--pe-card);
  border-radius: 8px;
  font-size: 0.82rem;
}

.promo-value-before {
  color: var(--pe-muted);
  text-decoration: line-through;
  opacity: 0.75;
}

.promo-value-after {
  color: var(--pe-cyan);
  font-weight: 700;
}

.promo-hero-mock {
  width: 100%;
  max-width: 440px;
  margin-top: 0.75rem;
  text-align: left;
}

.promo-hero-search {
  padding: 0.55rem 0.85rem;
  border: 2px solid var(--pe-violet);
  border-radius: 8px;
  background: var(--pe-card);
  font-weight: 700;
  color: var(--pe-violet);
  margin-bottom: 0.5rem;
}

.promo-hero-hit {
  padding: 0.65rem 0.85rem;
  background: var(--pe-card);
  border: 1px solid rgba(167, 139, 250, 0.35);
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--pe-muted);
  margin-bottom: 0.5rem;
}

.promo-hero-hit.is-glow {
  animation: promoHitPulse 1.5s ease infinite;
}

.promo-hero-hit strong {
  color: var(--pe-violet);
}

.promo-hero-play {
  padding: 0.65rem;
  background: #0f172a;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 8px;
  text-align: center;
  color: var(--pe-cyan);
  font-weight: 700;
  font-size: 0.85rem;
}

.promo-dual-row {
  display: flex;
  gap: 0.65rem;
  width: 100%;
  max-width: 440px;
  margin-top: 0.75rem;
}

.promo-dual-card {
  flex: 1;
  padding: 0.75rem;
  background: var(--pe-card);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 10px;
  text-align: left;
}

.promo-dual-card strong {
  display: block;
  color: var(--pe-cyan);
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.promo-dual-card span {
  font-size: 0.75rem;
  color: var(--pe-muted);
  line-height: 1.4;
}

.promo-story-cta-hint {
  margin-top: 0.85rem;
  font-size: 0.82rem;
  color: var(--pe-cta);
  font-weight: 600;
  animation: promoBounce 2s ease infinite;
}

@keyframes promoBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

.promo-embed--featured .promo-dot[data-chapter] {
  width: auto;
  min-width: 9px;
  height: 9px;
  padding: 0 2px;
  border-radius: 999px;
  font-size: 0;
}

.promo-embed--featured .promo-dot.is-active {
  min-width: 28px;
}

@media (max-width: 600px) {
  .promo-mode-tabs {
    top: 8px;
    right: 8px;
  }
  .promo-try-form {
    flex-direction: column;
  }
  .promo-dual-row {
    flex-direction: column;
  }
}
