:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system,
               "Segoe UI", Arial, sans-serif;
  color: #fff;
  background: #102239;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #102239;
}

/* =========================================
   FONDO FOTOGRAFICO
   ========================================= */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: #102239;
}

.backdrop::before {
  content: "";
  position: absolute;
  inset: -18px;

  background-image: url("/img/fondo-distribucion.jpg");
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;

  filter: blur(5px);
  transform: scale(1.025);
}

.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      180deg,
      rgba(5, 18, 35, 0.77) 0%,
      rgba(8, 27, 49, 0.70) 48%,
      rgba(5, 18, 35, 0.85) 100%
    );
}

/* =========================================
   CONTENEDOR PRINCIPAL
   ========================================= */

.page {
  width: min(1190px, calc(100% - 36px));
  margin: auto;
  padding: 32px 0 24px;
  position: relative;
  z-index: 1;
}

/* =========================================
   ENCABEZADO
   ========================================= */

.header {
  text-align: center;
}

.brand {
  display: block;
  width: clamp(170px, 23vw, 250px);
  height: 145px;
  object-fit: contain;
  margin: 0 auto 3px;
}

.eyebrow {
  display: block;
  letter-spacing: .32em;
  font-size: 11px;
  font-weight: 700;
  color: #c8d7e9;
}

.header h1 {
  font-size: clamp(29px, 4vw, 53px);
  line-height: 1.1;
  letter-spacing: -.035em;
  margin: 14px 0 9px;
  text-wrap: balance;
}

.subtitle {
  font-size: clamp(15px, 1.7vw, 20px);
  color: #d6e2f0;
  margin: 0 0 37px;
}

/* =========================================
   TARJETAS
   ========================================= */

.centers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.center {
  display: block;
  text-decoration: none;
  color: #193452;
  background: rgba(255,255,255,.97);
  border: 2px solid rgba(255,255,255,.65);
  border-radius: 20px;
  overflow: hidden;

  box-shadow: 0 18px 44px rgba(0,0,0,.28);

  transition:
    transform .18s,
    box-shadow .18s;
}

.center:hover,
.center:focus-visible {
  transform: translateY(-5px);
  box-shadow: 0 24px 50px rgba(0,0,0,.42);
}

.center:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}

/* =========================================
   FOTOGRAFIAS DE CIUDADES
   ========================================= */

.photo {
  height: 185px;
  position: relative;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.photo::after {
  content: "";
  position: absolute;
  inset: 0;

  background: linear-gradient(
    transparent 45%,
    rgba(0,0,0,.47)
  );
}

.photo--santiago {
  background-image:
    linear-gradient(
      145deg,
      rgba(31,85,130,.45),
      rgba(11,30,58,.45)
    ),
    url("/img/santiago.jpg");

  background-color: #426f9b;
}

.photo--osorno {
  background-image:
    linear-gradient(
      145deg,
      rgba(34,91,75,.45),
      rgba(11,48,57,.5)
    ),
    url("/img/osorno.jpg");

  background-color: #427e72;
}

.photo--concepcion {
  background-image:
    linear-gradient(
      145deg,
      rgba(77,81,125,.45),
      rgba(29,46,79,.55)
    ),
    url("/img/concepcion.jpg");

  background-color: #647caa;
}

.photo-tag {
  position: absolute;
  bottom: 14px;
  left: 18px;
  z-index: 1;

  color: #fff;
  font-size: 11px;
  letter-spacing: .12em;
  font-weight: 750;
}

/* =========================================
   CONTENIDO TARJETAS
   ========================================= */

.center-body {
  text-align: center;
  padding: 20px 22px 18px;
}

.center-code {
  font-weight: 850;
  font-size: 34px;
  letter-spacing: -.03em;
}

.center h2 {
  font-size: 23px;
  font-weight: 600;
  margin: 0;
}

.center p {
  font-size: 13px;
  color: #61748b;
  margin: 9px 0 20px;
}

/* =========================================
   BOTONES
   ========================================= */

.enter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;

  background: #175cba;
  border-radius: 11px;
  padding: 14px;

  color: white;
  font-weight: 700;
}

.center--pft .enter {
  background: #168352;
}

.center--psl .enter {
  background: #cc172d;
}

.enter span {
  font-size: 20px;
  line-height: 1;
}

/* =========================================
   PIE DE PAGINA
   ========================================= */

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;

  margin: 39px auto 0;
  padding-top: 18px;

  border-top: 1px solid rgba(255,255,255,.24);
  max-width: 640px;

  color: #d1ddeb;
  font-size: 12px;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.footer img {
  width: 47px;
  height: 47px;
  object-fit: contain;

  background: #fff;
  border-radius: 8px;
  padding: 3px;
}

/* =========================================
   DISPOSITIVOS MOVILES
   ========================================= */

@media (max-width: 760px) {

  .page {
    padding-top: 17px;
  }

  .brand {
    height: 115px;
  }

  .centers {
    grid-template-columns: 1fr;
    max-width: 460px;
    margin: auto;
    gap: 18px;
  }

  .photo {
    height: 150px;
  }

  .subtitle {
    margin-bottom: 25px;
  }

  .footer {
    margin-top: 28px;
  }

  .header h1 {
    font-size: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .center {
    transition: none;
  }
}

/* CORRECCION: fondo visible detras del contenido */
html {
  background: #102239;
}

body {
  background: transparent;
  isolation: isolate;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #102239;
}

.backdrop::before {
  content: "";
  position: absolute;
  inset: -18px;
  background: url("/img/fondo-distribucion.jpg") center center / cover no-repeat;
  filter: blur(5px);
  transform: scale(1.025);
}

.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(5, 18, 35, 0.70) 0%,
    rgba(8, 27, 49, 0.65) 50%,
    rgba(5, 18, 35, 0.82) 100%
  );
}

.page {
  position: relative;
  z-index: 1;
}

/* AJUSTE FINAL: aclarar fotografia del anden */
.backdrop::after {
  background: linear-gradient(
    180deg,
    rgba(5, 18, 35, 0.32) 0%,
    rgba(8, 27, 49, 0.25) 50%,
    rgba(5, 18, 35, 0.40) 100%
  );
}
