/* Plan pages: the cinematic hero panel (Boom Host, Boom AI-PMS, Enterprise, Pricing).
 *
 * A Higgsfield interior/aerial loop plays muted behind Boom's own product cards,
 * which are real HTML (not baked into the video) so they stay sharp, editable and
 * honest. Videos + posters live in assets/plans/ (provenance in assets/plans/SOURCES.md).
 *
 * Markup:
 *   <div class="ph" data-ph>
 *     <video class="ph-video" autoplay muted loop playsinline preload="metadata"
 *            poster="assets/plans/host-poster.webp" aria-hidden="true">
 *       <source src="assets/plans/host-loop.webm" type="video/webm">
 *       <source src="assets/plans/host-loop.mp4" type="video/mp4">
 *     </video>
 *     <div class="ph-card ph-a" style="--d:.3s"> … </div>   (position classes: ph-a … ph-d)
 *   </div>
 *   <script src="plan-hero.js?v=1" defer></script>
 *
 * Card building blocks: .ph-head (.ph-dot + label + .ph-time), .ph-msg (.ph-msg.boom for BAM),
 * .ph-row (label + .ph-val), .ph-chip (.ok / .warn / .info), .ph-cal (mini calendar strip).
 */
.ph {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 6 / 5;
  background: #1b2440;
  box-shadow: 0 40px 80px -40px rgba(16, 27, 49, 0.55), 0 0 0 1px rgba(16, 27, 49, 0.06);
  isolation: isolate;
}
.ph.wide { aspect-ratio: 16 / 10; }
.ph-video, .ph > img.ph-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 50%;
  border-radius: 0 !important; z-index: -1;
}
.ph::after { /* soft vignette so the cards read on any frame */
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(16, 27, 49, 0) 45%, rgba(16, 27, 49, 0.28) 100%);
}

.ph-card {
  position: absolute;
  width: min(300px, 58%);
  padding: 13px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px -18px rgba(16, 27, 49, 0.55), 0 0 0 1px rgba(16, 27, 49, 0.06);
  font-family: 'Manrope', sans-serif; font-size: 12.5px; line-height: 1.45; color: #101b31;
  text-align: left;
}
.ph-a { top: 7%; left: 6%; }
.ph-b { top: 34%; right: 6%; }
.ph-c { bottom: 8%; left: 9%; }
.ph-d { top: 9%; right: 7%; width: min(220px, 44%); }

.ph-toggle { /* added by plan-hero.js */
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  width: 34px; height: 34px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(16, 27, 49, 0.55); color: #fff; font-size: 11px; line-height: 34px; letter-spacing: -1px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.ph-toggle:hover { background: rgba(16, 27, 49, 0.8); }
.ph-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.ph-head { display: flex; align-items: center; gap: 7px; margin-bottom: 8px;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 11px;
  letter-spacing: .06em; text-transform: uppercase; color: #5b6478; }
.ph-head .ph-time { margin-left: auto; font-weight: 600; letter-spacing: 0; text-transform: none; }
.ph-dot { width: 8px; height: 8px; border-radius: 50%; background: #2fbf71; box-shadow: 0 0 0 3px rgba(47, 191, 113, .18); }
.ph-msg { padding: 8px 10px; border-radius: 12px; background: #f2f4f7; margin-top: 6px; }
.ph-msg.boom { background: #354bdf; color: #fff; margin-left: 18px; }
.ph-msg small { display: block; font-size: 10.5px; opacity: .7; margin-bottom: 2px; font-weight: 700; }
.ph-row { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-top: 1px solid #eef0f4; }
.ph-head + .ph-row { border-top: 0; } /* the first row sits right under the header */
.ph-val { font-family: 'Space Grotesk', sans-serif; font-weight: 700; }
.ph-chip { display: inline-block; margin-top: 7px; padding: 3px 8px; border-radius: 99px; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.ph-chip.ok { background: #e3f6ec; color: #17784a; }
.ph-chip.warn { background: #fff0e8; color: #c2501f; }
.ph-chip.info { background: #e8ebff; color: #354bdf; }
.ph-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin-top: 4px; }
.ph-cal i { height: 16px; border-radius: 4px; background: #eef0f4; }
.ph-cal i.b { background: #354bdf; } .ph-cal i.c { background: #ff8b5c; } .ph-cal i.g { background: #2fbf71; }
.ph-big { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 26px; letter-spacing: -.03em; }

@media (prefers-reduced-motion: no-preference) {
  .ph-card { opacity: 0; animation: phIn .8s cubic-bezier(.2, .7, .2, 1) var(--d, .2s) forwards, phFloat 7s ease-in-out calc(var(--d, .2s) + .9s) infinite; }
  @keyframes phIn { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
  @keyframes phFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
  .ph-msg.boom.typing::after { content: ''; display: inline-block; width: 18px; height: 6px; margin-left: 6px;
    background: radial-gradient(circle, #fff 2px, transparent 2.5px) 0 50% / 6px 6px repeat-x; animation: phDots 1.2s steps(3) infinite; }
  @keyframes phDots { from { width: 6px; } to { width: 18px; } }
}

@media (max-width: 640px) {
  .ph { aspect-ratio: 4 / 5; border-radius: 20px; }
  .ph-card { width: 72%; font-size: 11.5px; padding: 10px 11px; }
  .ph-d { display: none; }
  .ph-b { top: 40%; }
}
