/*
 * Hero de página con video de fondo (Figma: Header_Video [Desktop], 1440x810).
 * Ocupa la primera pantalla; el video cubre todo y un velo lo funde con el fondo de la página.
 */
.xg-page-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100svh - var(--xg-nav-height));
  padding: var(--xg-space-8) var(--xg-gutter);
  overflow: hidden;
  isolation: isolate;
  background: var(--xg-surface-cont-1);
  text-align: center;
}

.xg-page-hero__video {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Constelación del equipo (js/v2/constellation.js): aparece cuando termina el splash */
.xg-page-hero__constellation {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1200ms var(--xg-ease-out);
}

.xg-page-hero__constellation.is-ready {
  opacity: 1;
}

/* Halo de marca detrás de la esfera para darle profundidad */
.xg-page-hero:has(.xg-page-hero__constellation) {
  background:
    radial-gradient(circle at 50% 50%, rgba(0, 80, 77, 0.35), transparent 55%),
    radial-gradient(circle at 70% 70%, rgba(90, 42, 51, 0.18), transparent 50%),
    var(--xg-surface-cont-1);
}

/* El título no bloquea el cursor: las fotos que pasan detrás siguen siendo clicables */
.xg-page-hero__content {
  pointer-events: none;
}

.xg-page-hero__content a,
.xg-page-hero__content button {
  pointer-events: auto;
}

.xg-page-hero.is-picking {
  cursor: pointer;
}

/* Con la constelación no hace falta oscurecer el centro (el JS atenúa lo que pasa tras el título):
   solo se funde la orilla inferior con la sección siguiente */
.xg-page-hero:has(.xg-page-hero__constellation) .xg-page-hero__shade {
  background: linear-gradient(180deg, rgba(9, 15, 15, 0) 78%, var(--xg-surface) 100%);
}

/* Velo: oscurece detrás del título y funde la orilla inferior con la sección siguiente */
.xg-page-hero__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 45% at 50% 45%, rgba(9, 15, 15, 0.55), rgba(9, 15, 15, 0) 100%),
    linear-gradient(180deg, rgba(9, 15, 15, 0.25) 0%, rgba(9, 15, 15, 0) 40%, var(--xg-surface) 100%);
  pointer-events: none;
}

.xg-page-hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--xg-space-4);
  width: 100%;
  max-width: 920px;
}

.xg-page-hero__overline {
  color: var(--xg-on-surface);
}

/* typography/h1 del Figma: Poppins 96 / 1 / -1.5 */
.xg-page-hero__title {
  font-family: var(--xg-font-display);
  font-weight: 500;
  font-size: clamp(3rem, 1.6rem + 5.6vw, 6rem);
  line-height: 1;
  letter-spacing: -1.5px;
  color: var(--xg-on-surface);
}

.xg-page-hero__title .xg-line {
  display: block;
}

/* Cada línea entra con un leve desenfoque (mismo lenguaje que los heros del Home y /services) */
.xg-js .xg-page-hero__title .xg-line {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(24px);
  transition:
    opacity 900ms var(--xg-ease-out),
    filter 900ms var(--xg-ease-out),
    transform 900ms var(--xg-ease-out);
}

.xg-js .xg-page-hero__title .xg-line:nth-child(2) {
  transition-delay: 140ms;
}

.xg-js .xg-page-hero__title.is-visible .xg-line {
  opacity: 1;
  filter: blur(0);
  transform: none;
}

@media (max-width: 599px) {
  .xg-page-hero {
    padding-block: var(--xg-space-7);
  }

  .xg-page-hero__title {
    letter-spacing: -0.5px;
  }
}
