/* Ported from HomeHero.module.css — scoped for mmhp-lander homepage. */
.mmhp-home-hero { position: relative; width: 100%; }

.mmhp-home-hero__section {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: clamp(620px, 78vh, 680px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
}

/* --- Layer 1: blurred atmospheric background --- */
.mmhp-home-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.mmhp-home-hero__bg-video-mount {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
}

.mmhp-home-hero__bg-video {
  position: absolute;
  inset: -8%;
  width: 116%;
  height: 116%;
  object-fit: cover;
  object-position: 30% center;
  display: block;
  /* Ambient only — heavy blur + slight desaturation so the framed hero stays focal */
  filter: blur(28px) saturate(0.82);
  transform: scale(1.12);
  transform-origin: center;
  pointer-events: none;
}

.mmhp-home-hero__bg-poster {
  position: absolute;
  inset: -8%;
  width: 116%;
  height: 116%;
  object-fit: cover;
  object-position: 30% center;
  display: block;
  filter: blur(28px) saturate(0.82);
  transform: scale(1.12);
  transform-origin: center;
  z-index: 0;
}

.mmhp-home-hero__bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    90deg,
    rgba(15, 23, 42, 0.62) 0%,
    rgba(15, 23, 42, 0.52) 45%,
    rgba(15, 23, 42, 0.66) 75%,
    rgba(15, 23, 42, 0.78) 100%
  );
}

/* --- Stage: framed hero with bottom content panel --- */
.mmhp-home-hero__stage {
  position: relative;
  z-index: 1;
  width: min(92vw, 1400px);
  margin: 0 auto;
  padding: clamp(20px, 3vw, 36px) 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  min-height: inherit;
}

.mmhp-home-hero__foreground {
  position: relative;
  width: 100%;
  flex-shrink: 0;
  height: min(68vh, 600px);
  min-height: 480px;
  border-radius: 20px;
  box-shadow:
    0 22px 56px rgba(15, 23, 42, 0.38),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

.mmhp-home-hero__media {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  background: #0f172a;
  z-index: 0;
}

/* Immediate LCP visual (SSR). Video overlays this on desktop only. */
.mmhp-home-hero__fg-poster {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% center;
  z-index: 0;
}

.mmhp-home-hero__fg-video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% center;
  /* Hidden until a slot is marked active so src switches never flash the poster / prior clip. */
  opacity: 0;
  z-index: 1;
  pointer-events: none;
}

.mmhp-home-hero__fg-video.is-active {
  opacity: 1;
  z-index: 2;
}

/* Bottom-centered desktop panel (~68% width, ~14px from bottom) */
.mmhp-home-hero__panel {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: 68%;
  max-width: calc(100% - 64px);
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
  padding: clamp(14px, 1.5vw, 18px) clamp(18px, 2vw, 24px);
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.3);
  z-index: 2;
}

.mmhp-home-hero__copy {
  flex: 1 1 auto;
  min-width: 0;
  /* Wider text column so the headline wraps more cleanly; CTA stays 220px */
  max-width: min(48rem, calc(100% - 220px - 40px));
  text-align: left;
}

.mmhp-home-hero__title {
  margin: 0;
  /* ~23–24px on common desktops; slightly larger only on very wide screens */
  font-size: clamp(1.375rem, 1.2rem + 0.25vw, 1.5rem); /* 22–24px */
  line-height: 1.28;
  letter-spacing: -0.02em;
  color: #f8fafc;
  font-weight: 700;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: none;
}

.mmhp-home-hero__subtitle {
  margin: 14px 0 0;
  color: rgba(248, 250, 252, 0.92);
  font-size: clamp(0.88rem, 1.05vw, 0.98rem);
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.mmhp-home-hero__subtitle-link {
  color: #e0e7ff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mmhp-home-hero__subtitle-link:hover {
  color: #fff;
}

.mmhp-home-hero__cta-col {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  margin: 0;
  width: 220px;
}

.mmhp-home-hero__cta-row {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  margin: 0;
  width: 100%;
}

.mmhp-home-hero__reassurance {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: rgba(248, 250, 252, 0.82);
  text-align: center;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/*
 * Hero CTAs must beat lander.css `:is(.mmhp-site) a { color: var(--primary) }`
 * (specificity 0,1,1). Use `a.mmhp-…` under `.mmhp-site` so only these links
 * are affected — not header signup or other site CTAs.
 */
:is(.mmhp-site, .editor-styles-wrapper) a.mmhp-home-hero__cta {
  box-sizing: border-box;
  height: 44px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  width: 100%;
}

:is(.mmhp-site, .editor-styles-wrapper) a.mmhp-home-hero__cta--primary,
:is(.mmhp-site, .editor-styles-wrapper) a.mmhp-home-hero__cta--primary:visited {
  background: #4f46e5;
  color: #fff;
  border: 1px solid #4f46e5;
}

:is(.mmhp-site, .editor-styles-wrapper) a.mmhp-home-hero__cta--primary:hover,
:is(.mmhp-site, .editor-styles-wrapper) a.mmhp-home-hero__cta--primary:active {
  background: #4338ca;
  border-color: #4338ca;
  color: #fff;
}

:is(.mmhp-site, .editor-styles-wrapper) a.mmhp-home-hero__cta--primary:focus-visible {
  outline: 2px solid #a5b4fc;
  outline-offset: 2px;
  color: #fff;
}

:is(.mmhp-site, .editor-styles-wrapper) a.mmhp-home-hero__cta--secondary,
:is(.mmhp-site, .editor-styles-wrapper) a.mmhp-home-hero__cta--secondary:visited {
  background: rgba(15, 23, 42, 0.4);
  color: #f8fafc;
  border: 1.5px solid rgba(248, 250, 252, 0.75);
}

:is(.mmhp-site, .editor-styles-wrapper) a.mmhp-home-hero__cta--secondary:hover,
:is(.mmhp-site, .editor-styles-wrapper) a.mmhp-home-hero__cta--secondary:active {
  background: rgba(248, 250, 252, 0.12);
  border-color: #fff;
  color: #fff;
}

:is(.mmhp-site, .editor-styles-wrapper) a.mmhp-home-hero__cta--secondary:focus-visible {
  outline: 2px solid #c7d2fe;
  outline-offset: 2px;
  color: #f8fafc;
}

:is(.mmhp-site, .editor-styles-wrapper) a.mmhp-home-hero__cta--outline {
  background: rgba(255, 255, 255, 0.92);
  color: #4338ca;
  border: 2px solid #4f46e5;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
}

@media (max-width: 1440px) {
  .mmhp-home-hero__title {
    font-size: 1.5rem; /* 24px */
    line-height: 1.28;
  }
}

@media (max-width: 1280px) {
  .mmhp-home-hero__title {
    font-size: 1.4375rem; /* 23px */
    line-height: 1.28;
  }
}

/* Mid desktop / narrow laptop: keep bottom placement, stack copy above CTAs */
@media (max-width: 1100px) {
  .mmhp-home-hero__panel {
    width: 72%;
    max-width: calc(100% - 48px);
    bottom: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .mmhp-home-hero__copy {
    max-width: none;
  }

  .mmhp-home-hero__cta-col {
    width: 100%;
    min-width: 0;
  }

  .mmhp-home-hero__cta-row {
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100%;
    min-width: 0;
  }

  :is(.mmhp-site, .editor-styles-wrapper) a.mmhp-home-hero__cta {
    flex: 1 1 0;
    width: auto;
    white-space: normal;
    height: auto;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 13px;
  }
}

@media (max-width: 900px) {
  .mmhp-home-hero__section {
    min-height: 0;
    align-items: stretch;
  }

  .mmhp-home-hero__bg-overlay {
    background: linear-gradient(
      180deg,
      rgba(15, 23, 42, 0.4) 0%,
      rgba(15, 23, 42, 0.55) 50%,
      rgba(15, 23, 42, 0.82) 100%
    );
  }

  .mmhp-home-hero__stage {
    width: min(94vw, 1400px);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 14px 0 16px;
    min-height: 0;
  }

  .mmhp-home-hero__foreground {
    height: auto;
    min-height: 0;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .mmhp-home-hero__media {
    position: relative;
    inset: auto;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    box-shadow:
      0 22px 56px rgba(15, 23, 42, 0.38),
      0 0 0 1px rgba(255, 255, 255, 0.08);
  }

  .mmhp-home-hero__fg-video {
    object-position: center center;
  }

  .mmhp-home-hero__fg-poster {
    object-position: center center;
  }

  /* Panel sits below the media — not overlaid on the mobile video */
  .mmhp-home-hero__panel {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    width: 100%;
    max-width: none;
    flex-direction: column;
    align-items: stretch;
    border-radius: 14px;
    gap: 12px;
    padding: 14px 16px;
  }

  .mmhp-home-hero__copy {
    max-width: none;
  }

  .mmhp-home-hero__title {
    font-size: clamp(1.3rem, 4vw, 1.6rem);
    line-height: 1.25;
  }

  .mmhp-home-hero__subtitle {
    margin-top: 10px;
    font-size: 0.92rem;
    line-height: 1.5;
  }

  .mmhp-home-hero__cta-row {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
  }

  :is(.mmhp-site, .editor-styles-wrapper) a.mmhp-home-hero__cta {
    flex: 1 1 calc(50% - 10px);
    width: auto;
    height: auto;
    min-height: 46px;
    padding: 10px 14px;
    font-size: 14px;
    white-space: normal;
  }
}

@media (max-width: 768px) {
  .mmhp-home-hero__stage {
    width: min(100vw - 28px, 1400px);
    padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  }

  .mmhp-home-hero__title {
    font-size: clamp(1.28rem, 5.2vw, 1.55rem);
  }

  .mmhp-home-hero__cta-row {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 10px;
  }

  :is(.mmhp-site, .editor-styles-wrapper) a.mmhp-home-hero__cta {
    width: 100%;
    flex: none;
    min-height: 46px;
    font-size: 15px;
    padding: 12px 16px;
  }
}
