/**
 * Hero video overlays + live campus / analytics showcase styling.
 */

/* ── Hero video play overlay ── */
.mkt-edt-hero__media {
  position: relative;
  cursor: pointer;
}

.mkt-hero-video__overlay,
.mkt-video-portal__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: color-mix(in srgb, #0f172a 42%, transparent); /* off-token-allow: status-overlay */
  color: #faf7f2; /* off-token-allow: always-dark-surface */
  cursor: pointer;
  transition: background 200ms ease, opacity 200ms ease;
  z-index: 2;
}

.mkt-hero-video__overlay span:first-child,
.mkt-video-portal__overlay-icon {
  width: 3.5rem;
  height: 3.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--mkt-edt-accent, #c2410c) 88%, #fff);
  font-size: 1.25rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.35);
}

.mkt-video-portal__overlay-text {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mkt-edt-hero__media.is-playing .mkt-hero-video__overlay,
.mkt-video-portal.is-playing .mkt-video-portal__overlay {
  opacity: 0;
  pointer-events: none;
}

.mkt-video-portal.is-playing .mkt-video-portal__overlay[hidden],
.mkt-edt-hero__media.is-playing .mkt-hero-video__overlay[hidden] {
  display: none;
}

.mkt-video-portal.is-error::after {
  content: attr(data-error-hint);
  position: absolute;
  inset: auto 1rem 4rem;
  font-size: 0.75rem;
  color: #fecaca; /* off-token-allow: brand-color */
}

/* ── Hero media stack: video + live viz ── */
.mkt-hero-showcase {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  max-width: min(40rem, 100%);
}

.mkt-hero-showcase__video .mkt-video-portal {
  max-width: none;
  width: 100%;
}

.mkt-hero-showcase__visual {
  margin: 0;
  width: 100%;
}

.mkt-hero-showcase__composite {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 1rem;
  border: 1px solid var(--mkt-edt-rule);
  box-shadow: var(--mkt-edt-shadow-artifact, 0 24px 48px -16px rgba(31, 41, 55, 0.18));
}

.mkt-hero-showcase__caption {
  margin: 0.65rem 0 0;
  text-align: center;
}

.mkt-live-pulse {
  border-radius: 1rem;
  border: 1px solid var(--mkt-edt-rule);
  background: var(--mkt-tile, #fff);
  padding: 1rem 1.1rem 1.25rem;
  box-shadow: var(--mkt-edt-shadow-artifact, 0 24px 48px -16px rgba(31, 41, 55, 0.18));
}

.mkt-live-pulse__canvas svg {
  width: 100%;
  height: auto;
  display: block;
}

.mkt-live-pulse__stat-row {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.mkt-live-pulse__stat {
  padding: 0.65rem 0.75rem;
  border-radius: 0.5rem;
  background: color-mix(in srgb, var(--mkt-personality-accent-soft, rgba(194, 65, 12, 0.08)) 100%, transparent);
  border: 1px solid color-mix(in srgb, var(--mkt-personality-accent, var(--mkt-edt-accent)) 18%, var(--mkt-edt-rule));
}

.mkt-live-pulse__stat-value {
  display: block;
  font-family: var(--mkt-edt-font-display, "Source Serif 4", serif);
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  font-variant-numeric: tabular-nums;
  color: var(--mkt-edt-ink);
}

.mkt-live-pulse__stat-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--mkt-edt-ink-muted);
}

.mkt-live-pulse__bar {
  transform-origin: bottom center;
  animation: mkt-pulse-bar 2.4s ease-in-out infinite alternate;
}

.mkt-live-pulse__bus {
  animation: mkt-pulse-bus 6s linear infinite;
}

.mkt-live-pulse__spark {
  stroke-dasharray: 8 6;
  animation: mkt-pulse-spark 3s ease-in-out infinite alternate;
}

@keyframes mkt-pulse-spark {
  from { stroke-dashoffset: 0; opacity: 0.75; }
  to { stroke-dashoffset: 24; opacity: 1; }
}

@keyframes mkt-pulse-bar {
  from { transform: scaleY(0.88); opacity: 0.85; }
  to { transform: scaleY(1); opacity: 1; }
}

@keyframes mkt-pulse-bus {
  0% { transform: translate(120px, 250px); }
  33% { transform: translate(280px, 240px); }
  66% { transform: translate(420px, 255px); }
  100% { transform: translate(560px, 248px); }
}

.mkt-live-pulse__viz-panel {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--mkt-edt-rule);
}

.mkt-live-pulse__viz-eyebrow {
  margin: 0 0 0.65rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mkt-edt-ink-muted);
}

.mkt-edt-walkthrough__poster--secondary {
  width: 100%;
  text-align: left;
  cursor: pointer;
  border: 0;
  padding: 0;
  background: transparent;
  font: inherit;
  color: inherit;
}

.mkt-edt-walkthrough__tour-link {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  color: var(--mkt-edt-accent-hover, #9a3412);
  text-decoration: none;
}

.mkt-edt-walkthrough__tour-link:hover {
  text-decoration: underline;
}

.mkt-live-pulse__viz-panel .rmc-viz-root {
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--mkt-edt-rule);
  background: var(--mkt-edt-bg-soft, #f2ede4);
}

@media (prefers-reduced-motion: reduce) {
  .mkt-live-pulse__bar,
  .mkt-live-pulse__bus,
  .mkt-live-pulse__spark {
    animation: none;
  }
}

@media (min-width: 64rem) {
  .mkt-hero-showcase {
    max-width: none;
  }
}

/* Visual QA guard: hero media must never let intrinsic SVG/poster widths
 * create page-level horizontal overflow on tablet or desktop. */
[data-mkt-edition="editorial"] .mkt-edt-hero__grid {
  grid-template-columns: minmax(0, 1fr);
  max-width: 100%;
}

[data-mkt-edition="editorial"] .mkt-edt-hero__copy,
[data-mkt-edition="editorial"] .mkt-edt-hero__artifact,
.mkt-hero-showcase,
.mkt-hero-showcase__visual,
.mkt-live-pulse {
  min-width: 0;
  max-width: 100%;
}

[data-mkt-edition="editorial"] .mkt-edt-hero__artifact {
  overflow: hidden;
}

.mkt-video-portal__poster img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

@media (min-width: 64rem) {
  [data-mkt-edition="editorial"] .mkt-edt-hero--edge .mkt-edt-hero__grid {
    grid-template-columns: minmax(18rem, 40vw) minmax(0, 1fr);
  }
}
