/* =========================================================
   SIDISAT · Página "En construcción"
   Todos los ajustes habituales están en :root
   ========================================================= */

:root {
  /* --- Azules del logotipo SIDISAT --- */
  --color-blue-light:  #3a7bd0;   /* triángulo claro */
  --color-blue-dark:   #2e3266;   /* triángulo oscuro (marino) */

  /* --- Fondo: blanco degradado a gris claro --- */
  --color-bg-top:      #ffffff;
  --color-bg-mid:      #f1f3f6;
  --color-bg-bottom:   #e3e6eb;

  /* --- Texto y superficies --- */
  --color-text:        var(--color-blue-dark);   /* títulos y datos */
  --color-muted:       #555d70;   /* texto secundario (contraste AA) */
  --color-accent:      var(--color-blue-light);  /* iconos, foco, detalles */
  --color-accent-soft: rgb(58 123 208 / 0.10);
  --color-line:        #d9dee6;
  --color-card:        #ffffff;

  /* --- Tipografía (pila del sistema: cero descargas) --- */
  --font-base: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;

  /* --- Imagen --- */
  --img-max-width: 980px;   /* ancho máximo de la imagen */
  --img-ratio: 1.819;       /* ancho ÷ alto de la imagen (1692 ÷ 930) */
  --img-max-height: 46svh;  /* alto máximo para que todo quepa en pantalla */
  --img-radius: 18px;

  /* --- Efecto al pasar el mouse sobre la imagen --- */
  --hover-scale: 1.06;      /* zoom; usa 1 para desactivarlo */
  --hover-blur: 0px;        /* difuminado; prueba 2px para activarlo */
  --hover-duration: 700ms;

  /* --- Espaciado --- */
  --gap-section: clamp(1.1rem, 3vh, 2.25rem);  /* entre imagen, texto y contacto */
  --page-padding: clamp(1rem, 4vw, 3rem);
  --page-padding-y: clamp(1rem, 3.5vh, 2.5rem);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;      /* respaldo para navegadores antiguos */
  min-height: 100svh;     /* altura real en móviles (sin barra del navegador) */
  display: flex;
  flex-direction: column;
  font-family: var(--font-base);
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-bg-mid);
  background-image:
    linear-gradient(180deg, var(--color-bg-top) 0%, var(--color-bg-mid) 55%, var(--color-bg-bottom) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

/* ---------- Distribución: bloque central ---------- */
.page {
  flex: 1;
  display: grid;
  place-items: center;          /* centrado horizontal y vertical */
  padding: var(--page-padding-y) var(--page-padding);
}

.hero {
  width: 100%;
  max-width: var(--img-max-width);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap-section);
  text-align: center;
  animation: entrada 700ms cubic-bezier(.2, .7, .2, 1) both;
}

/* ---------- Imagen principal ---------- */
.hero__media {
  margin: 0;
  /* El ancho se limita también por la altura disponible, sin deformar */
  width: min(100%, calc(var(--img-max-height) * var(--img-ratio)));
  aspect-ratio: 1692 / 930;
  border-radius: var(--img-radius);
  overflow: hidden;             /* recorta el zoom dentro del marco */
  position: relative;
  isolation: isolate;
  background: #dde1e7;          /* color mientras carga */
  box-shadow:
    0 0 0 1px rgb(46 50 102 / 0.08),
    0 24px 50px -22px rgb(46 50 102 / 0.45),
    0 6px 16px -8px rgb(46 50 102 / 0.25);
  transition: box-shadow var(--hover-duration) ease;
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;            /* la caja ya tiene la misma proporción: no recorta */
  transform: scale(1);
  filter: blur(0);
  transition:
    transform var(--hover-duration) cubic-bezier(.2, .7, .2, 1),
    filter var(--hover-duration) ease;
}

/* Viñeta sutil que aparece con el efecto */
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgb(46 50 102 / 0.35));
  opacity: 0;
  transition: opacity var(--hover-duration) ease;
}

/* Solo en dispositivos con puntero real (no en pantallas táctiles) */
@media (hover: hover) and (pointer: fine) {
  .hero__media:hover {
    box-shadow:
      0 0 0 2px var(--color-blue-light),
      0 30px 60px -22px rgb(46 50 102 / 0.55),
      0 0 36px -8px rgb(58 123 208 / 0.40);
  }
  .hero__media:hover .hero__img {
    transform: scale(var(--hover-scale));
    filter: blur(var(--hover-blur));
  }
  .hero__media:hover::after { opacity: 1; }
}

/* ---------- Mensaje ---------- */
.hero__text { max-width: 46rem; }

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin: 0 0 .6rem;
  padding: .3rem .85rem;
  border-radius: 999px;
  background: var(--color-accent-soft);
  color: var(--color-blue-dark);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* Punto indicador estático (no parpadea) */
.hero__eyebrow::before {
  content: "";
  width: .45rem;
  height: .45rem;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 0 3px rgb(58 123 208 / 0.25);
}

.hero__title {
  margin: 0;
  font-size: clamp(1.6rem, 1.1rem + 2.4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
  color: var(--color-blue-dark);
}

/* Barra bicolor bajo el título, como los dos triángulos del logo */
.hero__title::after {
  content: "";
  display: block;
  width: 4.5rem;
  height: 4px;
  margin: .75rem auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--color-blue-light) 50%, var(--color-blue-dark) 50%);
}

.hero__lead {
  margin: .75rem auto 0;
  max-width: 34rem;
  font-size: clamp(1rem, .95rem + .3vw, 1.125rem);
  color: var(--color-muted);
  text-wrap: pretty;
}

/* ---------- Contacto ---------- */
.contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  font-style: normal;           /* <address> es cursiva por defecto */
  width: 100%;
}

.contact__item {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: .9rem;
  align-items: center;
  min-width: 15.5rem;
  padding: .85rem 1.25rem .85rem 1rem;
  border: 1px solid var(--color-line);
  border-radius: 14px;
  background: var(--color-card);
  color: var(--color-text);
  box-shadow: 0 4px 14px -8px rgb(46 50 102 / 0.25);
  text-align: left;
  text-decoration: none;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

.contact__icon {
  grid-row: 1 / 3;
  width: 2.5rem;
  height: 2.5rem;
  padding: .6rem;
  border-radius: 10px;
  background: var(--color-accent-soft);
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: background-color .25s ease, stroke .25s ease;
}

.contact__label {
  font-size: .75rem;
  color: var(--color-muted);
  letter-spacing: .04em;
}

.contact__value {
  font-size: 1.05rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.contact__item:hover {
  border-color: var(--color-blue-light);
  box-shadow: 0 10px 22px -10px rgb(58 123 208 / 0.45);
  transform: translateY(-2px);
}
.contact__item:hover .contact__icon {
  background: var(--color-blue-light);
  stroke: #ffffff;
}

/* Icono relleno (WhatsApp): mismo color, sin contorno */
.contact__icon--fill {
  fill: var(--color-accent);
  stroke: none;
  transition: background-color .25s ease, fill .25s ease;
}
.contact__item:hover .contact__icon--fill { fill: #ffffff; }

.contact__item:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

/* ---------- Pie ---------- */
.footer {
  padding: 0 var(--page-padding) 1.25rem;
  text-align: center;
  font-size: .8rem;
  color: #5f6779;
}
.footer p { margin: 0; }

/* ---------- Responsivo ---------- */

/* Teléfonos: contacto apilado y a todo lo ancho */
@media (max-width: 560px) {
  :root { --img-radius: 12px; }
  .contact { flex-direction: column; align-items: stretch; }
  .contact__item { min-width: 0; }
}

/* Móviles en horizontal o pantallas muy bajas: imagen más compacta */
@media (max-height: 520px) and (orientation: landscape) {
  :root {
    --img-max-height: 46svh;
    --gap-section: 1rem;
  }
  .hero__lead,
  .hero__eyebrow { display: none; }   /* prioriza imagen, título y contacto */
}

/* ---------- Animación de entrada ---------- */
@keyframes entrada {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* Respeta a quien prefiere menos movimiento */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
  .hero__media:hover .hero__img { transform: none; }
}
