/**
 * FRONTEND PROMPT 3 — Homepage “Dark Command Center” hero
 * Scoped to body.mg-public section.hero.mg-hero-command
 */

body.mg-public section.hero.mg-hero-command {
  /* Avoid forcing a full viewport slab when inner content is shorter (FIX C). */
  min-height: auto;
  background: var(--bg-navy);
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}

@media (min-width: 901px) {
  body.mg-public section.hero.mg-hero-command {
    min-height: min(92vh, 880px);
  }
}

body.mg-public section.hero.mg-hero-command::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 80% 80%, rgba(14, 158, 118, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 10% 10%, rgba(29, 78, 216, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

body.mg-public section.hero.mg-hero-command::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.04) 1px, transparent 0);
  background-size: 36px 36px;
  pointer-events: none;
}

body.mg-public section.hero.mg-hero-command .hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 55fr 45fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

body.mg-public section.hero.mg-hero-command .hero-content {
  max-width: 100%;
}

body.mg-public section.hero.mg-hero-command .hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-300);
  margin-bottom: 24px;
  padding: 8px 16px;
  background: rgba(14, 158, 118, 0.1);
  border: 1px solid rgba(14, 158, 118, 0.2);
  border-radius: 100px;
}

body.mg-public section.hero.mg-hero-command .eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal-400);
  animation: mgHeroEyebrowPulse 2s infinite;
}

@keyframes mgHeroEyebrowPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.3);
  }
}

body.mg-public section.hero.mg-hero-command .hero-headline {
  color: #fff;
  margin-bottom: 24px;
  font-size: clamp(44px, 5.5vw, 76px);
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

body.mg-public section.hero.mg-hero-command .headline-italic {
  font-style: italic;
  color: var(--teal-300);
}

body.mg-public section.hero.mg-hero-command .hero-subhead {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 52ch;
}

body.mg-public section.hero.mg-hero-command .hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

body.mg-public section.hero.mg-hero-command .hero-micro-demo {
  margin-top: 0;
  margin-bottom: 0;
  font-size: 13px;
}

body.mg-public section.hero.mg-hero-command .hero-micro-demo a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.mg-public section.hero.mg-hero-command .hero-micro-demo a:hover {
  color: var(--teal-300);
}

/* Hero video + floating cards */
body.mg-public section.hero.mg-hero-command .hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

body.mg-public section.hero.mg-hero-command .hero-visual-media {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 640px;
}

/* Hero column — dashboard graphic instead of embedded video */
body.mg-public section.hero.mg-hero-command .mg-hero-dashboard-frame {
  position: relative;
  width: 100%;
  max-width: 640px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 40px 80px rgba(0, 0, 0, 0.5),
    0 0 80px rgba(14, 158, 118, 0.12);
  animation: float 6s ease-in-out infinite;
  background: rgba(7, 13, 29, 0.65);
}

body.mg-public section.hero.mg-hero-command .mg-hero-dashboard-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
}

body.mg-public section.hero.mg-hero-command .mg-hero-dashboard-frame:focus-within {
  animation: none;
}

/* Shared: aspect box + iframe fill (#demo-video uses same partial as embedded walkthrough) */
body.mg-public .hero-video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

body.mg-public .hero-video-wrapper .hero-video-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  border: none;
  /* Beat global responsive iframe rules (e.g. height: auto) on small viewports */
  max-height: none;
}

body.mg-public section.hero.mg-hero-command .hero-video-wrapper {
  max-width: 640px;
  border-radius: 16px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 40px 80px rgba(0, 0, 0, 0.5),
    0 0 80px rgba(14, 158, 118, 0.12);
  animation: float 6s ease-in-out infinite;
}

body.mg-public section.hero.mg-hero-command .hero-video-wrapper .hero-video-iframe {
  border-radius: 16px;
}

body.mg-public section.hero.mg-hero-command .hero-video-wrapper:focus-within {
  animation: none;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Product showcase (#demo-video) — full-width video inside .mg-browser-frame */
body.mg-public #demo-video.mg-product-showcase .mg-browser-frame .hero-video-wrapper {
  display: block;
  max-width: none;
  width: 100%;
  min-width: 0;
  margin: 0;
  animation: none;
  box-shadow: none;
  border-radius: 0;
  flex: 0 0 auto;
}

body.mg-public #demo-video.mg-product-showcase .mg-browser-frame .hero-video-wrapper .hero-video-iframe {
  border-radius: 0;
}

/* Column layout so the video row always spans the frame below the chrome bar */
body.mg-public #demo-video.mg-product-showcase .mg-browser-frame {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* Floating notification cards */
body.mg-public section.hero.mg-hero-command .float-card {
  position: absolute;
  background: #fff;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-float);
  min-width: 220px;
  max-width: min(260px, 90vw);
  animation: mgHeroFloatCard 5s ease-in-out infinite;
}

body.mg-public section.hero.mg-hero-command .float-card-1 {
  top: -16px;
  right: -20px;
  animation-delay: 0s;
}

body.mg-public section.hero.mg-hero-command .float-card-2 {
  bottom: 30px;
  left: -20px;
  animation-delay: 2.5s;
}

@keyframes mgHeroFloatCard {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

body.mg-public section.hero.mg-hero-command .float-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

body.mg-public section.hero.mg-hero-command .float-card-icon.success {
  background: var(--teal-50);
  color: var(--teal-500);
}

body.mg-public section.hero.mg-hero-command .float-card-icon.ai {
  background: var(--gold-100);
  color: var(--gold-500);
}

body.mg-public section.hero.mg-hero-command .float-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

body.mg-public section.hero.mg-hero-command .float-card-sub {
  font-size: 11px;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  body.mg-public section.hero.mg-hero-command .hero-inner {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }

  body.mg-public section.hero.mg-hero-command .hero-subhead {
    margin-left: auto;
    margin-right: auto;
  }

  body.mg-public section.hero.mg-hero-command .hero-ctas {
    justify-content: center;
  }

  body.mg-public section.hero.mg-hero-command .hero-visual {
    display: flex;
    margin-top: 40px;
  }

  body.mg-public section.hero.mg-hero-command .hero-visual-media {
    max-width: 100%;
  }

  body.mg-public section.hero.mg-hero-command .hero-video-wrapper {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    border-radius: 12px;
  }

  body.mg-public section.hero.mg-hero-command .mg-hero-dashboard-frame {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    border-radius: 12px;
  }

  body.mg-public section.hero.mg-hero-command .hero-video-iframe {
    border-radius: 12px;
  }

  body.mg-public section.hero.mg-hero-command .float-card {
    display: none;
  }

  body.mg-public section.hero.mg-hero-command {
    padding: 100px 0 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.mg-public section.hero.mg-hero-command .hero-video-wrapper,
  body.mg-public section.hero.mg-hero-command .mg-hero-dashboard-frame,
  body.mg-public section.hero.mg-hero-command .float-card {
    animation: none;
  }

  body.mg-public section.hero.mg-hero-command .eyebrow-dot {
    animation: none;
  }
}

/* Anchor offset under fixed navbar */
body.mg-public #demo-video.mg-product-showcase {
  scroll-margin-top: 96px;
}

/* RTL column swap */
[dir="rtl"] body.mg-public section.hero.mg-hero-command .hero-inner .hero-content {
  order: 2;
}

[dir="rtl"] body.mg-public section.hero.mg-hero-command .hero-inner .hero-visual {
  order: 1;
}

body.mg-public .hero-coaching-teaser {
  color: var(--accent-teal, #0e9e76);
  font-weight: 600;
  text-decoration: none;
}

body.mg-public .hero-coaching-teaser:hover {
  text-decoration: underline;
}

body.mg-public .home-coaching {
  padding: 4.5rem 0;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

body.mg-public .home-coaching-lead {
  max-width: 52rem;
  margin: 0 auto 1.5rem;
  color: var(--text-muted, #5c6b7a);
  font-size: 1.05rem;
}

body.mg-public .home-coaching-pill {
  background: #fff;
  border: 1px solid rgba(13, 33, 55, 0.1);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
}

body.mg-public .home-coaching-link {
  color: var(--accent-teal, #0e9e76);
  font-weight: 600;
  text-decoration: none;
}

body.mg-public .home-proof-stats {
  color: var(--text-muted, #5c6b7a);
  font-size: 0.95rem;
}

body.mg-public .home-proof-stats strong {
  color: var(--bg-navy, #0d2137);
  display: block;
  font-size: 1.25rem;
}

body.mg-public .home-cta-section {
  padding: 4rem 0;
  background: var(--bg-navy, #0d2137);
  color: #fff;
}

body.mg-public .home-cta-section-lead {
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}
