/* Homepage hero video and neutral light-mode surface. */
body.home .bg-grid {
  display: none;
}

/* Keep the first homepage composition self-contained on desktop. The fixed
 * header is part of the calculation, so the content is centered in the
 * remaining viewport instead of being nudged with a brittle top offset. */
body.home #home.hero {
  box-sizing: border-box;
  min-height: 100svh;
  padding-top: calc(var(--header-h) + clamp(32px, 5vh, 64px));
  padding-bottom: clamp(28px, 4vh, 48px);
}

body.home.theme-light {
  --bg: #ffffff;
  --bg-2: #ffffff;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-2: rgba(255, 255, 255, 0.96);
  --border: rgba(15, 23, 42, 0.1);
  --border-2: rgba(15, 23, 42, 0.16);
}

body.home.theme-light #site-main,
body.home.theme-light #site-main > .section {
  background-color: #ffffff;
}

body.home.theme-light .glow-orb {
  display: none;
}

.hero-video-visual {
  isolation: isolate;
}

.hero-video-frame {
  position: relative;
  z-index: 1;
  width: min(100%, 720px);
  margin-left: auto;
  aspect-ratio: 16 / 9;
  padding: 5px;
  overflow: hidden;
  border: 1px solid rgba(255, 138, 80, 0.34);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 87, 34, 0.04));
  box-shadow:
    0 32px 80px -34px rgba(0, 0, 0, 0.84),
    0 0 52px rgba(255, 87, 34, 0.18);
  transform: perspective(1100px) rotateY(-2deg) rotateX(1deg);
  transition: transform 0.45s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.hero-video-frame::before {
  content: "";
  position: absolute;
  inset: -22%;
  z-index: -1;
  background: radial-gradient(circle, rgba(255, 104, 50, 0.2), transparent 66%);
  filter: blur(28px);
  pointer-events: none;
}

.hero-video-frame:hover {
  border-color: rgba(255, 167, 38, 0.58);
  box-shadow:
    0 38px 90px -36px rgba(0, 0, 0, 0.9),
    0 0 64px rgba(255, 87, 34, 0.24);
  transform: perspective(1100px) rotateY(0) rotateX(0) translateY(-4px);
}

.hero-showcase-video {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 23px;
  background: #0a0b12;
  object-fit: cover;
}

body.home.theme-light .hero-video-frame {
  border-color: rgba(15, 23, 42, 0.14);
  background: #ffffff;
  box-shadow: 0 28px 70px -34px rgba(15, 23, 42, 0.38);
}

body.home.theme-light .hero-video-frame::before {
  display: none;
}

@media (max-width: 1024px) {
  .hero-video-frame {
    width: min(100%, 680px);
    margin: 0 auto;
    transform: none;
  }
}

@media (max-width: 640px) {
  .hero-video-frame {
    width: 100%;
    padding: 3px;
    border-radius: 19px;
  }

  .hero-showcase-video {
    border-radius: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-video-frame {
    transition: none;
    transform: none;
  }
}

/* Homepage hero composition refinement.
 * Keep the existing content, typography, media and motion intact while
 * matching the approved editorial balance more closely. */
body.home #home .hero-content,
body.home #home .hero-video-visual {
  min-width: 0;
}

body.home #home .hero-sub {
  margin-bottom: 24px;
}

body.home #home .hero-cta {
  margin-bottom: 44px;
}

body.home #home .hero-metrics {
  max-width: 510px;
  gap: 0;
}

body.home #home .hero-metrics .metric {
  min-width: 0;
  padding: 0 28px;
  border-right: 1px solid var(--border-2);
}

body.home #home .hero-metrics .metric:first-child {
  padding-left: 0;
}

body.home #home .hero-metrics .metric:last-child {
  padding-right: 0;
  border-right: 0;
}

@media (min-width: 1181px) {
  body.home #home .hero-grid {
    max-width: 1440px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: clamp(36px, 3vw, 48px);
  }

  body.home #home .badge {
    margin-bottom: 30px;
  }

  body.home #home .hero-video-visual {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin: 0;
  }

  body.home #home .hero-video-frame {
    width: min(100%, 720px);
    max-width: 720px;
  }
}

@media (max-width: 1180px) {
  body.home #home.hero {
    min-height: auto;
    padding-top: calc(var(--header-h) + 48px);
    padding-bottom: 64px;
  }

  body.home #home .hero-grid,
  body.home #home .hero-content,
  body.home #home .hero-video-visual {
    width: 100%;
    max-width: 100%;
  }

  body.home #home .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body.home #home .hero-video-visual {
    margin: 0;
  }
}

@media (max-width: 640px) {
  body.home #home .hero-grid {
    gap: 40px;
  }

  body.home #home .hero-title--balanced .hero-title-line {
    white-space: normal;
  }

  body.home #home .hero-sub {
    max-width: 100%;
  }

  body.home #home .hero-cta {
    margin-bottom: 40px;
  }

  body.home #home .hero-metrics {
    width: 100%;
    max-width: 100%;
  }

  body.home #home .hero-metrics .metric {
    padding: 0 12px;
  }

  body.home #home .hero-metrics .metric:first-child {
    padding-left: 0;
  }

  body.home #home .hero-metrics .metric:last-child {
    padding-right: 0;
  }
}
