/* ===========================================================
   Grupo Merhi — portal estático
   Tokens extraídos del diseño de Figma (1920×1080)
   =========================================================== */
:root {
  --color-white: #ffffff;
  --pill-border: rgba(255, 255, 255, 0.5);
  --company-bg: rgba(255, 255, 255, 0.2);
  --company-border: rgba(255, 255, 255, 0.3);
  --company-bg-hover: rgba(255, 255, 255, 0.32);
  --overlay: rgba(0, 0, 0, 0.35);

  --font: "Montserrat", system-ui, -apple-system, sans-serif;

  /* Imagen de fondo: sustituir por la foto exportada de Figma */
  --hero-bg: url("../assets/img/hero-bg.jpg");
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

::selection {
  background: #364b56;
  color: #ffffff;
}
::-moz-selection {
  background: #364b56;
  color: #ffffff;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  color: var(--color-white);
  background: #1a1d22;
  overflow: hidden; /* sin scroll: la home ocupa exactamente la ventana */
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
  /* fallback de degradado mientras no haya foto */
  background-color: #20242b;
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: center;
}

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

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--overlay);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(40px, 7vh, 96px) clamp(20px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 100px; /* separación fija entre bloques */
  text-align: center;
}

/* ---------- Preheader ---------- */
.preheader {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--pill-border);
  border-radius: 100px;
  padding: 8px clamp(20px, 2vw, 32px);
  font-weight: 300;
  font-size: clamp(12px, 1.2vw, 18px);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ---------- Título y subtítulo ---------- */
.hero__heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 2vh, 28px);
  width: 100%;
}

.hero__title {
  margin: 0;
  font-weight: 700;
  font-size: clamp(72px, 12vw, 180px);
  line-height: 0.9;
  letter-spacing: -0.01em;
}

.hero__subtitle {
  margin: 0;
  max-width: 620px;
  font-weight: 300;
  font-size: clamp(14px, 1.4vw, 20px);
  line-height: 1.35;
}

/* ---------- Empresas ---------- */
.companies {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: clamp(10px, 2vw, 32px);
  max-width: 100%;
}

.company {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--company-bg);
  border: 1px solid var(--company-border);
  border-radius: 100px;
  padding: 10px clamp(16px, 1.6vw, 32px);
  color: var(--color-white);
  text-decoration: none;
  font-weight: 300;
  font-size: clamp(13px, 1.3vw, 20px);
  white-space: nowrap;
  backdrop-filter: blur(2px);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.company:hover,
.company:focus-visible {
  background: var(--company-bg-hover);
  transform: translateY(-2px);
  outline: none;
}

.company__arrow {
  width: 0.95em;
  height: 0.95em;
  flex-shrink: 0;
}

/* ---------- Móvil: píldoras apiladas, mismo ancho, sin scroll ---------- */
@media (max-width: 600px) {
  .hero__content {
    gap: 48px; /* menos aire para que todo quepa */
    padding-top: clamp(28px, 6vh, 48px);
    padding-bottom: clamp(28px, 6vh, 48px);
  }

  .hero__subtitle {
    max-width: 280px; /* mismo ancho visual que los botones */
  }

  .companies {
    flex-direction: column;
    align-items: stretch; /* todas al mismo ancho */
    width: 100%;
    max-width: 280px;
    gap: 12px;
  }

  .company {
    justify-content: center;
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
  }
}
