/* Hero: tres columnas alrededor de la figura central */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.25fr) minmax(280px, 0.95fr);
  gap: var(--gutter);
  padding-block: clamp(1rem, 0.4rem + 2vw, 2.5rem) 0;
}

.hero__column {
  position: relative;
  z-index: 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-8);
}

/* Columnas fijas: la del medio queda libre para la figura, sin div vacio. */
.hero__column--start {
  grid-column: 1;
}

.hero__column--end {
  grid-column: 3;
  align-items: flex-end;
  text-align: right;
}

/* --- Figura central ---
   Se dimensiona por ALTURA, no por ancho: atada a un ancho en vw crecia con la
   ventana hasta tapar la barra superior en pantallas anchas. */
.hero__figure {
  position: absolute;
  z-index: 1;
  left: 52%;
  bottom: calc(var(--gutter) * -1);
  height: min(76svh, 800px);
  aspect-ratio: 632 / 806;
  transform: translate3d(-50%, 0, 0);
  filter: drop-shadow(var(--shadow-hero));
  will-change: transform;
}

/* <picture> es inline por defecto y encogeria al ancho del contenido. */
.hero__figure picture {
  display: block;
  height: 100%;
}

.hero__figure img,
.hero__figure svg {
  height: 100%;
  width: auto;
}

/* Halo detras de la figura */
.hero__figure::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 6% 10% 28%;
  border-radius: 50%;
  background: radial-gradient(circle, oklch(78% 0.06 262 / 0.5), transparent 68%);
  filter: blur(30px);
}

/* --- Copy --- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow__dot {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.hero__title {
  max-width: 12ch;
  margin-block: 0.28em 0.5em;
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  text-wrap: balance;
  text-shadow: 0 3px 0 oklch(20% 0.07 262 / 0.26);
}

.hero__lead {
  max-width: 32ch;
  font-size: var(--text-lead);
  color: var(--color-cream-soft);
}

/* --- Marca de convenio ---
   Sin rotulo al lado: la entradilla justo encima ya nombra a la EPS, y un
   "atendemos afiliados a" pegado al logo sonaria a eco. La regla corta hace de
   separador para que el logo no se lea como parte del parrafo. */
.hero__eps {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.hero__eps::before {
  content: "";
  width: 32px;
  height: 1px;
  flex: none;
  background: oklch(100% 0 0 / 0.55);
}

.hero__eps img {
  width: auto;
  height: 22px;
}

/* --- Botones --- */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.85em;
  border-radius: var(--radius-pill);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition:
    transform var(--duration-fast) var(--ease-spring),
    box-shadow var(--duration-normal) var(--ease-out-expo),
    background-color var(--duration-fast) ease;
}

.btn:hover {
  transform: translate3d(0, -3px, 0);
}

.btn:active {
  transform: translate3d(0, 0, 0) scale(0.98);
}

/* Celeste y no azul corporativo: el escenario ya arranca en ese mismo azul,
   asi que un boton de tinta se perderia contra el fondo. */
.btn--solid {
  padding: 1.1em 1.5em 1.1em 1.8em;
  font-size: var(--text-sm);
  background: var(--color-accent);
  color: var(--color-on-accent);
  box-shadow: var(--shadow-pill);
}

.btn--solid:hover {
  box-shadow: 0 18px 34px oklch(20% 0.09 262 / 0.44);
}

.btn--solid .btn__arrow {
  transition: transform var(--duration-normal) var(--ease-out-expo);
}

.btn--solid:hover .btn__arrow {
  transform: translate3d(5px, 0, 0);
}

/* Misma pastilla celeste, para las llamadas a la accion fuera del hero */
.btn--accent {
  padding: 1.1em 1.5em 1.1em 1.8em;
  font-size: var(--text-sm);
  background: var(--color-accent);
  color: var(--color-on-accent);
  box-shadow: var(--shadow-lift);
}

.btn--ghost {
  padding: 0.5em 1.6em 0.5em 0.5em;
  font-size: var(--text-xs);
  line-height: 1.15;
  text-align: left;
  border: 1.5px solid oklch(100% 0 0 / 0.55);
  color: var(--color-cream);
}

.btn--ghost:hover {
  background: oklch(100% 0 0 / 0.12);
}

.btn__badge {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-on-accent);
}

/* --- Bloque de servicios (columna derecha) --- */
.hero__aside {
  max-width: 24ch;
}

.chiprow {
  display: flex;
  justify-content: flex-end;
  margin-bottom: var(--space-4);
}

.chiprow__item {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: var(--radius-pill);
  border: 2px solid var(--color-cream);
  background: oklch(98% 0.006 236);
  color: var(--color-ink);
  transition: transform var(--duration-normal) var(--ease-spring);
}

.chiprow__item + .chiprow__item {
  margin-left: -14px;
}

.chiprow:hover .chiprow__item {
  transform: translate3d(0, -4px, 0);
}

.hero__aside-title {
  max-width: 16ch;
  margin-left: auto;
  font-size: var(--text-card);
  font-weight: 800;
  line-height: 1.15;
}

.hero__aside-note {
  margin-top: 0.35em;
  font-size: var(--text-sm);
  color: var(--color-cream-soft);
}

/* --- Sello circular --- */
/* Vive en el hueco de la columna izquierda, entre la entradilla y los botones.
   Centrado abajo caia justo sobre las manos de la figura. */
.seal {
  position: relative;
  align-self: flex-start;
  width: clamp(104px, 9vw, 132px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: var(--color-cream);
  filter: drop-shadow(0 6px 18px oklch(18% 0.08 262 / 0.5));
}

.seal__ring {
  position: absolute;
  inset: 0;
  animation: seal-spin 24s linear infinite;
}

.seal__ring text {
  fill: currentColor;
  font-family: var(--font-body);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 3.2px;
}

.seal__arrow {
  width: 32%;
  animation: seal-nudge 3.2s var(--ease-out-expo) infinite;
}

@keyframes seal-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes seal-nudge {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, 7px, 0);
  }
}

/* --- Responsive --- */
@media (max-width: 1160px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: var(--space-8);
  }

  .hero__column--end {
    align-items: flex-start;
    text-align: left;
  }

  .hero__aside {
    max-width: none;
  }

  .chiprow,
  .hero__aside-title {
    justify-content: flex-start;
    margin-left: 0;
  }

  /* Apilada, la figura termina en el corte recto del torso: lo difuminamos
     para que no quede una linea dura a mitad de pantalla. */
  /* Apilado el sello estorba: la flecha "baja" ya no significa nada. */
  .seal {
    display: none;
  }

  /* Apilada vuelve a mandar el ancho: aqui no compite con la barra superior. */
  .hero__figure {
    position: relative;
    left: auto;
    bottom: auto;
    order: -1;
    height: auto;
    aspect-ratio: auto;
    width: min(82%, 400px);
    margin: 0 auto -4%;
    transform: none;
    mask-image: linear-gradient(to bottom, #000 74%, transparent 99%);
    -webkit-mask-image: linear-gradient(to bottom, #000 74%, transparent 99%);
  }

  .hero__figure picture {
    height: auto;
  }

  .hero__figure img,
  .hero__figure svg {
    width: 100%;
    height: auto;
  }

  .hero__column--start,
  .hero__column--end {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    justify-content: center;
  }

  .btn--ghost {
    padding: 0.5em 1.2em 0.5em 0.5em;
  }
}
