/* ==========================================================================
   INTRO.CSS - ADAPTACIÓN COMPLETA CON LA PALETA DEL ISOLOGO INSTITUCIONAL
   ========================================================================== */

:root {
  --ocean-deep: #061726;
  --ocean-mid: #08243f;
  --land: #16324f;
  --sky-100: #e0f2fe;
  --sky-200: #bae6fd;
  --sky-300: #7dd3fc;
  --sky-400: #38bdf8;
  --slate-50: #f8fafc;
  --slate-300: #cbd5e1;
  
  /* Tokens exactos extraídos del widget de la mascota */
  --c1: var(--paleta-principal-isologo-1, #57A5DB);
  --c2: var(--paleta-principal-isologo-2, #3FC0F0);
  --c3: var(--paleta-principal-isologo-3, #1898C6);
  --c4: var(--paleta-principal-isologo-4, #1274A1);
  --c5: var(--paleta-principal-isologo-5, #1A85C7);
  --c6: var(--paleta-principal-isologo-6, #3F5FA8);
  --s1: var(--paleta-secundaria-derivada-1, #22577A);
  --s3: var(--paleta-secundaria-derivada-3, #57CC99);

  /* Degradado corporativo unificado para las tarjetas y el marcador */
  --ei-card-gradient: linear-gradient(135deg, var(--c4), var(--c3) 45%, var(--c1));
  
  --card-border: rgba(224, 242, 254, 0.25);
  --font-body: "Manrope", system-ui, -apple-system, sans-serif;
  --font-heading: "Exo", "Sora", sans-serif;
}

* {
  box-sizing: border-box;
}

.intro-stage {
  position: relative;
  /* border-radius: 10px; */
  overflow-x: clip;
  overflow-y: visible;
  width: 100%;
  height: 100dvh;
  max-height: 343px;
  background: var(--ocean-deep);
  margin: 0 auto;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-height: none;
}

#intro-canvas {
  position: absolute;
  inset: 0;
}

/* ---- Encabezado de Introducción ---- */
.intro-title {
  position: absolute;
  inset-inline: 0;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 1.5rem;
  text-align: center;
  pointer-events: none;
}

@media( min-width: 768px){
  .intro-title{
    padding-top: 2.5rem;
  }
}

.intro-eyebrow {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--sky-200);
}

.intro-heading {
  margin: 0.5rem 0 0;
  padding: 0 1.5rem;
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--slate-50);
  text-wrap: balance;
}

@media (min-width: 768px) {
  .intro-heading {
    font-size: 2.5rem;
  }
}

/* ---- Capas de Marcadores Dinámicos ---- */
.marker-layer {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.port-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
}

.port-dot {
  position: relative;
  display: inline-flex;
  height: 0.75rem;
  width: 0.75rem;
}

.port-dot__ping {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(63, 192, 240, 0.6); /* Integrado con --c2 */
  animation: ping 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.port-dot__core {
  position: relative;
  display: inline-flex;
  height: 0.75rem;
  width: 0.75rem;
  border-radius: 50%;
  background: var(--c2);
  box-shadow: 0 0 0 2px rgba(224, 242, 254, 0.4);
}

.port-label {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  border-radius: 0.25rem;
  background: rgba(2, 6, 23, 0.8);
  padding: 0.2rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--sky-100);
  backdrop-filter: blur(4px);
}

@keyframes ping {
  75%, 100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* ---- Marcador Destacado (Dock Sud con Gradiente Corporativo) ---- */
.dock-marker {
  position: absolute;
  z-index: 30;
  transform: translate(-40%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dock-emblem {
  display: flex;
  height: 10rem;
  width: 10rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  position: relative;
  background: rgba(2, 6, 23, 0.85);
  box-shadow: 0 0 35px rgba(24, 152, 198, 0.5); /* Resplandor basado en --c3 */
  backdrop-filter: blur(4px);
}

/* Pseudo-elemento para simular el borde con degradado lineal continuo */
.dock-emblem::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  padding: 2px;
  background: var(--ei-card-gradient);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.dock-emblem img {
  height: 6rem;
  width: 6rem;
  object-fit: contain;
  z-index: 2;
}

.dock-stem {
  margin-top: 0.175rem;
  height: 1rem;
  width: 3px; 
  background: var(--c3); /* Tono medio de acople */
}

.dock-pill {
  margin-top: -0.125rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: 20px;
  background: var(--ei-card-gradient); /* Degradado idéntico al fondo de las tarjetas */
  border: 1px solid var(--card-border);
  padding: 0.45rem 1.2rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff; 
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.dock-pill svg {
  height: 1.1rem;
  width: 1.1rem;
  color: #fff; /* El ancla se ilumina con el celeste brillante */
}
.dock-pill span{
  display: inline-block;
  margin:0;
  text-align: center;
}

/* ---- Estructura de Tarjetas de Valores (Ampliadas con Degradado) ---- */
.cards-layer {
  position: absolute;
  inset: 0;
  padding: 6rem 3rem 3rem;
  pointer-events: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  z-index: 40; 
}
@media(max-width: 430px){
  .cards-layer{
    padding-left: .2rem;
    padding-right: .2rem;
  }
}
@media(min-width:768px){
  .cards-layer{
    padding-top:8rem ;
  }
}

.cards-layer a {
  pointer-events: auto;
  height: 100%;
}

.value-card {
  /* position: absolute; */
  position: relative; /* Necesario para posicionar el modal respecto a la card */
  overflow: visible;  /* Asegura que el modal no se corte */
  width: auto;
  height: 100px;
  display: grid;
  grid-template-rows: 1fr 1fr;
  align-items: center;
  border-radius: 0.85rem;
  border: 1px solid var(--card-border);
  background: var(--ei-card-gradient); /* Aplicación del degradado lineal */
  padding: 1.1rem;
  box-shadow: 0 25px 35px rgba(2, 6, 23, 0.4);
  backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(0.75rem);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
@media(min-width: 376px){
  .value-card{
    width: 18rem; 
  }
}
@media(min-width: 992px){
  .value-card{
    height: 120px;
    width: 24rem; 
    padding: 1rem;
  }
}

/* 2. Estilos base del modal (Oculto por defecto) */
.value-card__modal {
  display: none; /* No existe para lectores de pantalla ni layout hasta > 425px */
}

/* 3. Comportamiento solo para pantallas mayores a 425px */
@media (min-width: 425px) {
  .value-card__modal {
    display: block;
    position: absolute;
    
    /* Posicionamiento arriba de la card */
    bottom: 105%; /* Se sitúa un 5% por encima del borde superior */
    left: 50%;
    transform: translateX(-50%) translateY(10px); /* Empieza un poco más abajo para el efecto */
    
    width: 280px; /* Ancho fijo para que no sea gigante */
    background: #ffffff;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    border: 1px solid #eee;
    
    /* Estética */
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Triangulito decorativo (opcional) */
  .value-card__modal::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: white transparent transparent transparent;
  }

  /* Mostrar al hacer hover */
  .value-card:hover .value-card__modal {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
  }

  .value-card__modal h4{
    font-weight: bold;
  }
}

.value-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.value-card__head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
}

.value-card__icon {
  justify-self: flex-start;
  display: flex;
  height: 2.5rem;
  width: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.6rem;
  background: var(--s1); 
  color: var(--slate-50);
  flex-shrink: 0;
}

.value-card__icon svg {
  height: 1.3rem;
  width: 1.3rem;
}

.value-card__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ocean-deep);
  text-shadow: 0 2px 4px rgba(2, 6, 23, 0.3);
  text-align: center;
}

@media (min-width: 768px) {
  .value-card__title {
    font-size: 1.8rem;
  }
}

.value-card__desc {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(248, 250, 254, 0.9); /* Texto con contraste optimizado sobre fondos variables */
  text-wrap: pretty;
  text-align: center;
  display: flex;
  align-items: center;
}

@media (min-width: 992px) {
  .value-card__desc {
    font-size: 1.3rem;
    padding: 0 2rem;
  }
}

/* ---- Posicionamiento de la Grilla ---- */

.value-card.pos-0,
.value-card.pos-2,
.value-card.pos-4,
.value-card.pos-6{
  grid-column: 1/2;
  justify-self: flex-start;
}
.value-card.pos-1,
.value-card.pos-3,
.value-card.pos-5,
.value-card.pos-7{
  grid-column: 2/3;
  justify-self: flex-end;
}
.value-card.pos-0,
.value-card.pos-1 
{ grid-row: 1/2;}

.value-card.pos-2,
.value-card.pos-3
{ grid-row: 2/3 }

.value-card.pos-4, 
.value-card.pos-5 
{ grid-row: 3/4; }

.value-card.pos-6, 
.value-card.pos-7 
{ grid-row: 4/5;}



/* ---- Footer Indicador Sutil ---- */
.intro-footer {
  position: absolute;
  inset-inline: 0;
  bottom: 1.5rem;
  z-index: 20;
  display: flex;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.intro-footer.is-visible {
  opacity: 1;
}

.intro-footer p {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--sky-200);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  50% { opacity: 0.4; }
}

@media (prefers-reduced-motion: reduce) {
  .port-dot__ping,
  .intro-footer p {
    animation: none;
  }
}

#intro-canvas {
  position: absolute;
  inset: 0px;
  width: 100%;
  height: 100%;
  /* Esto asegura que el contenido del canvas se centre y cubra el área 
     sin deformarse, similar a background-size: cover */
  object-fit: cover; 
  object-position: center bottom; /* Ajusta 'bottom' a 'center' si quieres que el zoom sea al medio exacto */
}