
:root {
  --negro: #05070d;
  --negro-2: #0a1226;
  --azul: #0053a6;
  --azul-brillo: #2d8cff;
  --hielo: #d6e6ff;
  --gris: #8ea3c4;

  --fuente-titulo: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --fuente-texto: "Source Serif 4", Georgia, "Times New Roman", serif;

  --bs-body-bg: var(--negro);
  --bs-body-color: var(--hielo);
}

html { background: var(--negro); }

body {
  background: var(--negro);
  color: var(--hielo);
  font-family: var(--fuente-texto);
  font-size: 1.125rem;
  line-height: 1.65;
  scroll-behavior: smooth;
}

a {
  color: #9cc9ff;
  text-decoration-color: rgba(45, 140, 255, 0.55);
  text-underline-offset: 0.2em;
}
a:hover { color: #fff; text-decoration-color: #fff; }
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--azul-brillo);
  outline-offset: 3px;
}


.barra {
  transition: background-color 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.barra.scrolled {
  background: rgba(5, 7, 13, 0.82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom-color: rgba(45, 140, 255, 0.28);
}
.barra .navbar-brand {
  font-family: var(--fuente-titulo);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  color: var(--hielo);
}
.barra .navbar-brand .w { color: var(--azul-brillo); text-shadow: 0 0 0.25em rgba(45, 140, 255, 0.55); }
.barra .nav-link {
  font-family: var(--fuente-titulo);
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--gris);
}
.barra .nav-link:hover { color: #fff; }

@media (max-width: 767.98px) {
  .barra .navbar-collapse {
    background: rgba(5, 7, 13, 0.94);
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(45, 140, 255, 0.28);
  }
  /* Orden en el menú hamburguesa: proyecto, explorar, idioma y, al final, buscador */
  .barra .navbar-nav .idioma { order: 2; }
  .barra .navbar-nav .buscar-item { order: 3; }
}


.intro {
  position: relative;
  height: 500vh;
}
.intro.reducido { height: 100vh; }

.intro-fijo {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

#acelerador {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.caption {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1.5rem;
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 0 28px rgba(5, 7, 13, 0.9), 0 0 6px rgba(5, 7, 13, 0.9);
}
.caption-abajo {
  justify-content: flex-end;
  padding-bottom: 12vh;
}

.caption h1 {
  font-family: var(--fuente-titulo);
  font-weight: 600;
  font-size: clamp(3.6rem, 13vw, 10rem);
  line-height: 0.9;
  letter-spacing: -0.01em;
  margin: 0;
  color: #fff;
}
/* Las tres W del título (www) en otro color */
.caption h1 .w {
  color: var(--azul-brillo);
  text-shadow: 0 0 0.25em rgba(45, 140, 255, 0.55);
}
.caption h2 {
  font-family: var(--fuente-titulo);
  font-weight: 500;
  font-size: clamp(2rem, 6vw, 4.2rem);
  line-height: 1;
  margin: 0;
  max-width: 18ch;
  color: #fff;
}
.caption p {
  margin: 1.2rem 0 0;
  font-style: italic;
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  color: var(--gris);
}

.pista {
  position: absolute;
  left: 50%;
  bottom: 2.2rem;
  z-index: 2;
  width: 1px;
  height: 3rem;
  background: rgba(214, 230, 255, 0.25);
  transform: translateX(-50%);
  overflow: hidden;
}
.pista span {
  display: block;
  width: 100%;
  height: 40%;
  background: var(--azul-brillo);
  animation: pista 1.8s ease-in-out infinite;
}
@keyframes pista {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(260%); }
}


.contenido {
  position: relative;
  padding: 0 0 5rem;
  background: linear-gradient(180deg, rgba(5, 7, 13, 0) 0%, rgba(10, 18, 38, 0.55) 100%);
}

.titulo-seccion {
  font-family: var(--fuente-titulo);
  font-weight: 600;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1;
  margin: 0 0 1.6rem;
  color: #fff;
}

.proyecto {
  max-width: 42rem;
  margin-bottom: 6rem;
}
.lead-texto {
  font-size: 1.5rem;
  line-height: 1.5;
}


.indice { margin: 0; }
.entrada {
  margin: 0;
  padding: 1.4rem 0;
  border-top: 1px solid rgba(45, 140, 255, 0.3);
}
.entrada:last-child { border-bottom: 1px solid rgba(45, 140, 255, 0.3); }
.entrada dt {
  font-family: var(--fuente-titulo);
  font-weight: 600;
  font-size: 1.9rem;
  line-height: 1.1;
}
.entrada dt a { text-decoration: none; color: #fff; }
.entrada dt a:hover { color: var(--azul-brillo); }
.entrada dd {
  margin: 0;
  color: var(--hielo);
  max-width: 38rem;
}
@media (max-width: 767.98px) {
  .entrada dt { margin-bottom: 0.4rem; }
}

.pie {
  position: relative;
  padding: 3.2rem 0 1.8rem;
  background: linear-gradient(180deg, rgba(10, 18, 38, 0.55), rgba(4, 8, 20, 0.96));
  color: var(--gris);
  font-size: 0.95rem;
}

.pie::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--azul-brillo) 50%, transparent);
  opacity: 0.7;
}
.pie-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr;
  gap: 2.5rem;
}
.pie-logo {
  display: inline-block;
  margin-bottom: 0.7rem;
  font-family: var(--fuente-titulo);
  font-weight: 600;
  font-size: 1.7rem;
  line-height: 1;
  color: #fff;
  text-decoration: none;
}
.pie .pie-logo, .pie .pie-logo:hover { color: #fff; }
.pie-logo .w { color: var(--azul-brillo); text-shadow: 0 0 0.3em rgba(45, 140, 255, 0.5); }
.pie p { margin: 0; max-width: 36ch; line-height: 1.65; }
.pie h3 {
  margin: 0 0 0.9rem;
  font-family: var(--fuente-titulo);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hielo);
}
.pie ul { list-style: none; margin: 0; padding: 0; }
.pie li + li { margin-top: 0.5rem; }
.pie a { color: var(--gris); text-decoration: none; transition: color 0.2s ease; }
.pie a:hover { color: var(--azul-brillo); }

.pie-subir {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: flex-end;
  padding: 1.5rem clamp(1rem, 4vw, 2rem) 1.5rem;
}
.pie-arriba {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--hielo);
  background: #060d1f;
  border: 1px solid rgba(45, 140, 255, 0.4);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.pie-arriba svg { transition: transform 0.2s ease; }
.pie-arriba:hover { background: #0b1a38; border-color: var(--azul-brillo); }
.pie-arriba:hover svg { transform: translateY(-2px); }
@media (max-width: 767.98px) {
  .pie { padding-top: 2.6rem; }
  .pie-grid { grid-template-columns: 1fr 1fr; gap: 2rem 1.5rem; }
  .pie-marca { grid-column: 1 / -1; }
}


@media (prefers-reduced-motion: reduce) {
  .pista span { animation: none; }
  .barra { transition: none; }
  .buscar-nav .buscador { transition: none; }
  .buscar-nav.vibra { animation: none; }
  .tarjeta.destacada::after { animation: none; opacity: 1; }
}


.buscador {
  background-color: rgba(10, 18, 38, 0.8);
  color: var(--hielo);
  border: 1px solid rgba(45, 140, 255, 0.35);
  border-radius: 0.25rem;
  padding: 0.7rem 1rem;
  font-family: var(--fuente-texto);
}
.buscador::placeholder { color: var(--gris); }
.buscador:focus {
  background-color: rgba(10, 18, 38, 0.95);
  color: #fff;
  border-color: var(--azul-brillo);
  box-shadow: 0 0 0 0.2rem rgba(45, 140, 255, 0.25);
}


.buscar-nav {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0.6rem 0 0.4rem;
}
.buscar-nav svg {
  position: absolute;
  left: 0.9rem;
  width: 1rem;
  height: 1rem;
  color: var(--gris);
  pointer-events: none;
  transition: color 0.2s;
}
.buscar-nav:focus-within svg { color: var(--azul-brillo); }
.buscar-nav .buscador {
  width: 100%;
  padding: 0.4rem 1rem 0.4rem 2.5rem;
  border-radius: 999px;
  font-size: 1rem;
  background-color: rgba(10, 18, 38, 0.55);
  transition: width 0.25s ease, background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.buscar-nav .buscador::-webkit-search-cancel-button { filter: invert(0.75); cursor: pointer; }

.buscar-nav.sin svg { color: #fff; }
.buscar-nav.sin .buscador,
.buscar-nav.sin .buscador:focus {
  border-color: #fff;
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.28);
}
.buscar-nav.vibra { animation: vibra 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97); }
@keyframes vibra {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-5px); }
  40%, 60% { transform: translateX(5px); }
}


.buscar-fantasma {
  position: absolute;
  top: 50%;
  left: calc(2.5rem + 1px);
  right: 1rem;
  transform: translateY(-50%);
  font-family: var(--fuente-texto);
  font-size: 1rem;
  line-height: 1.5;
  white-space: pre;
  overflow: hidden;
  pointer-events: none;
  color: transparent;
}
.buscar-fantasma[hidden] { display: none; }
.buscar-fantasma b { font-weight: normal; color: rgba(160, 185, 220, 0.5); }


.sugerencias {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  z-index: 1050;
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  max-height: 60vh;
  overflow-y: auto;
  background: rgba(10, 18, 38, 0.97);
  border: 1px solid rgba(45, 140, 255, 0.35);
  border-radius: 0.6rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.sugerencias[hidden] { display: none; }
.sug-grupo {
  padding: 0.55rem 0.7rem 0.2rem;
  font-family: var(--fuente-titulo);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gris);
}
.sug-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0.7rem;
  border-radius: 0.4rem;
  cursor: pointer;
  font-family: var(--fuente-titulo);
  font-weight: 500;
  font-size: 1.2rem;
  line-height: 1.2;
  color: var(--hielo);
}
.sug-item:hover,
.sug-item.activo { background: rgba(45, 140, 255, 0.22); color: #fff; }
.sug-punto {
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--c, var(--azul-brillo));
  box-shadow: 0 0 8px var(--c, var(--azul-brillo));
}

@media (min-width: 768px) {
  .sugerencias { left: auto; width: 20rem; }
  .buscar-nav { margin: 0 0.5rem 0 1rem; }
  .buscar-nav .buscador { width: 9.5rem; }
  .buscar-nav .buscador:focus { width: 13rem; }
}
@media (min-width: 992px) {
  .buscar-nav .buscador { width: 12rem; }
  .buscar-nav .buscador:focus { width: 17rem; }
}

.tarjetas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.tarjeta {
  --ac: #2d8cff;                
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.4rem 1.5rem 1.5rem;
  background: rgba(10, 18, 38, 0.9);
  border: 1px solid rgba(45, 140, 255, 0.28);
  border-top: 3px solid var(--ac);
  border-radius: 0.25rem;
  will-change: opacity, transform;
  backface-visibility: hidden;
}
.tarjeta[hidden] { display: none; }

.tarjeta::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 2px solid var(--ac);
  border-radius: 0.45rem;
  opacity: 0;
  pointer-events: none;
}
.tarjeta.destacada::after { animation: destaca 1.1s ease-out 2; }
@keyframes destaca {
  0%   { opacity: 0; transform: scale(0.97); }
  20%  { opacity: 1; }
  100% { opacity: 0; transform: scale(1.03); }
}
.tarjeta-num {
  margin-bottom: 0.3rem;
  font-family: var(--fuente-titulo);
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: 0.14em;
  color: var(--ac);
}
.tarjeta h3 {
  margin: 0 0 0.6rem;
  font-family: var(--fuente-titulo);
  font-weight: 600;
  font-size: 2rem;
  line-height: 1.05;
  color: #fff;
}
.tarjeta-texto { margin-bottom: 1.3rem; font-size: 1.05rem; line-height: 1.55; }

.abrir {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--azul-brillo);
  color: #fff;
  text-decoration: none;
  font-family: var(--fuente-titulo);
  font-weight: 500;
  font-size: 1.25rem;
}
.abrir:hover { background: var(--azul); color: #fff; }
.tarjeta .abrir {
  margin-top: auto;
  align-self: flex-start;
  border-color: var(--ac);
}
.tarjeta .abrir:hover { background: var(--ac); color: var(--negro); }

/* Canvas fijo donde viajan las partículas (encima del contenido, debajo de la barra) */
#particulas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}


.proyecto-escena {
  position: relative;
  height: 300vh;
}
.proyecto-fijo {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.5rem;
}
.proyecto-texto {
  max-width: 46rem;
  text-align: center;
}
.proyecto-texto .titulo-seccion {
  font-size: clamp(2.8rem, 7vw, 5rem);
  margin-bottom: 2rem;
}
.proyecto-texto .lead-texto { margin-bottom: 1.6rem; }
.texto-secundario { font-size: 1.2rem; margin: 0; }

.proyecto-escena.reducido { height: auto; padding: 6rem 0; }
.proyecto-escena.reducido .proyecto-fijo { position: static; height: auto; }

.explorar { padding-top: 3rem; scroll-margin-top: 1rem; }


#estrellas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}


.idioma-boton {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.idioma .dropdown-menu {
  --bs-dropdown-bg: rgba(10, 18, 38, 0.97);
  --bs-dropdown-border-color: rgba(45, 140, 255, 0.35);
  --bs-dropdown-border-radius: 0.25rem;
  --bs-dropdown-min-width: 10rem;
  --bs-dropdown-link-color: var(--hielo);
  --bs-dropdown-link-hover-color: #fff;
  --bs-dropdown-link-hover-bg: rgba(45, 140, 255, 0.18);
  --bs-dropdown-link-active-bg: var(--azul);
  font-family: var(--fuente-titulo);
}
.idioma .dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 500;
}
.idioma .dropdown-item[aria-current="true"] {
  color: #fff;
  font-weight: 600;
  background: rgba(45, 140, 255, 0.28);
}

.bandera {
  flex: none;
  width: 1.5rem;
  height: 1rem;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(214, 230, 255, 0.25);
}


html.cargando-activo,
html.cargando-activo body { overflow: hidden; }

.cargando {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: env(safe-area-inset-top, 0px) 1.5rem env(safe-area-inset-bottom, 0px);
  background: radial-gradient(ellipse at 50% 45%, var(--negro-2) 0%, var(--negro) 70%);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.cargando.oculta { opacity: 0; visibility: hidden; pointer-events: none; }

.cargando-centro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
  text-align: center;
}

.cargando-anillo {
  position: relative;
  width: clamp(88px, 26vw, 130px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(45, 140, 255, 0.35);
  box-shadow: 0 0 40px rgba(45, 140, 255, 0.18), inset 0 0 24px rgba(45, 140, 255, 0.12);
}
.cargando-haz {
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  animation: cargando-giro 1.6s linear infinite;
}
.cargando-haz::after {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px 3px var(--azul-brillo), 0 0 22px 6px rgba(45, 140, 255, 0.55);
}
.cargando-haz-2 { animation-direction: reverse; }

.cargando-nucleo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--azul-brillo);
  box-shadow: 0 0 16px 4px rgba(45, 140, 255, 0.6);
  animation: cargando-pulso 1.6s ease-in-out infinite;
}

.cargando-porcentaje {
  font-family: var(--fuente-titulo);
  font-weight: 600;
  font-size: clamp(2.6rem, 11vw, 4rem);
  line-height: 1;
  letter-spacing: 0.02em;
  color: #fff;
  font-variant-numeric: tabular-nums;
  min-width: 3.6ch;
  text-shadow: 0 0 0.25em rgba(45, 140, 255, 0.55);
}
.cargando-porcentaje small {
  font-size: 0.5em;
  margin-left: 0.1em;
  color: var(--azul-brillo);
}

.cargando-barra {
  width: min(220px, 60vw);
  height: 2px;
  background: rgba(45, 140, 255, 0.2);
  overflow: hidden;
}
.cargando-barra span {
  display: block;
  height: 100%;
  background: var(--azul-brillo);
  box-shadow: 0 0 10px var(--azul-brillo);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s ease-out;
}

@keyframes cargando-giro { to { transform: rotate(360deg); } }
@keyframes cargando-pulso {
  0%, 100% { transform: scale(0.8); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .cargando-haz { animation-duration: 6s; }
  .cargando-nucleo { animation: none; }
  .cargando { transition: none; }
}