/* Centro de Investigación de Estudiantes Aes.BIM UNSAAC */
:root {
  --noche: #0b0833;
  --marino: #150e6e;
  --indigo: #2418c9;
  --naranja: #ff8a3d;
  --naranja-osc: #c2410c;
  --papel: #f5f5fb;
  --blanco: #ffffff;
  --tinta: #14122b;
  --gris: #585673;
  --linea: #e1e0ee;
  --radio: 14px;
  --ancho: 1160px;
  --titulo: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --texto: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--blanco); color: var(--tinta);
  font-family: var(--texto); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--indigo); text-underline-offset: 3px; }
a:hover { color: var(--naranja-osc); }
h1, h2, h3, h4 { font-family: var(--titulo); line-height: 1.05; margin: 0; letter-spacing: .01em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--naranja); outline-offset: 3px; border-radius: 4px; }

.contenedor { width: 100%; max-width: var(--ancho); margin: 0 auto; padding: 0 20px; }
.saltar { position: absolute; left: -9999px; top: 0; background: var(--naranja); color: #000; padding: 10px 16px; z-index: 100; }
.saltar:focus { left: 8px; top: 8px; }

/* Cabecera */
.cabecera {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 8, 51, .94); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.cabecera .contenedor { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.marca { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.marca img { height: 40px; width: auto; }
.marca span {
  font-family: var(--titulo); font-weight: 700; font-size: 13px; line-height: 1.05;
  text-transform: uppercase; letter-spacing: .04em; padding-left: 12px; border-left: 2px solid #fff;
}
.nav ul { display: flex; gap: 4px; }
.nav a {
  color: #dcdaf5; text-decoration: none; font-size: 14.5px; font-weight: 500;
  padding: 8px 11px; border-radius: 8px; display: block;
}
.nav a:hover, .nav a.activo { color: #fff; background: rgba(255,255,255,.1); }
.nav a.cta { background: var(--naranja); color: #1b0d00; font-weight: 600; margin-left: 6px; }
.nav a.cta:hover { background: #ffa164; }
.boton-menu {
  display: none; background: none; border: 1px solid rgba(255,255,255,.3); color: #fff;
  width: 44px; height: 44px; border-radius: 10px; cursor: pointer; padding: 0;
}
.boton-menu svg { width: 22px; height: 22px; margin: auto; display: block; }

/* Portada */
.portada {
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(36,24,201,.75), transparent 60%),
    linear-gradient(180deg, var(--noche) 0%, var(--marino) 100%);
  color: #fff; padding: 56px 0 72px; overflow: hidden;
}
.portada .rejilla { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.sobretitulo {
  font-family: var(--titulo); font-weight: 600; text-transform: uppercase; letter-spacing: .14em;
  font-size: 15px; color: var(--naranja); margin-bottom: 14px; display: block;
}
.portada h1 { font-size: clamp(42px, 6vw, 74px); font-weight: 800; text-transform: uppercase; }
.portada h1 em { font-style: normal; color: var(--naranja); }
.portada .bajada { font-size: 18.5px; color: #d6d4f2; margin: 20px 0 28px; max-width: 34em; }
.botones { display: flex; flex-wrap: wrap; gap: 12px; }
.boton {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: 16px;
  padding: 13px 22px; border-radius: 10px; border: 2px solid transparent; transition: transform .15s, background .15s;
}
.boton:hover { transform: translateY(-2px); }
.boton.primario { background: var(--naranja); color: #1b0d00; }
.boton.primario:hover { background: #ffa164; color: #1b0d00; }
.boton.linea { border-color: rgba(255,255,255,.45); color: #fff; }
.boton.linea:hover { background: rgba(255,255,255,.1); color: #fff; }
.portada figure { margin: 0; position: relative; }
.portada figure img {
  width: 100%; border-radius: 18px; box-shadow: 0 30px 70px rgba(0,0,0,.5);
  border: 1px solid rgba(255,255,255,.15);
}
.portada figure::before {
  content: ""; position: absolute; inset: 18px -14px -14px 18px; border: 2px solid var(--naranja);
  border-radius: 18px; z-index: 0; opacity: .7;
}
.portada figure img { position: relative; z-index: 1; }
.portada figcaption { font-size: 13.5px; color: #b9b6e0; margin-top: 22px; position: relative; z-index: 1; }

.cifras { background: var(--noche); color: #fff; border-top: 1px solid rgba(255,255,255,.08); }
.cifras ul { display: grid; grid-template-columns: repeat(4, 1fr); }
.cifras li { padding: 26px 18px; border-left: 1px solid rgba(255,255,255,.08); }
.cifras li:first-child { border-left: 0; padding-left: 0; }
.cifras strong { font-family: var(--titulo); font-size: 40px; font-weight: 700; display: block; line-height: 1; color: var(--naranja); }
.cifras span { font-size: 14px; color: #c9c6ea; display: block; margin-top: 6px; line-height: 1.35; }

/* Secciones */
.seccion { padding: 84px 0; }
.seccion.suave { background: var(--papel); }
.seccion.oscura { background: linear-gradient(180deg, var(--noche), var(--marino)); color: #fff; }
.encabezado { max-width: 760px; margin-bottom: 44px; }
.encabezado h2 { font-size: clamp(36px, 4.6vw, 54px); font-weight: 800; text-transform: uppercase; }
.encabezado h2::after { content: ""; display: block; width: 72px; height: 5px; background: var(--naranja); margin-top: 16px; border-radius: 3px; }
.encabezado p { color: var(--gris); font-size: 18px; margin: 18px 0 0; }
.oscura .encabezado p { color: #cfcdee; }
.oscura a { color: #ffb37e; }

.dos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.tres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.cuatro { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }

.tarjeta {
  background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--radio);
  padding: 26px; height: 100%;
}
.tarjeta h3 { font-size: 26px; font-weight: 700; margin-bottom: 10px; }
.tarjeta p:last-child { margin-bottom: 0; }
.tarjeta .num {
  font-family: var(--titulo); font-weight: 700; font-size: 15px; letter-spacing: .12em;
  color: var(--naranja-osc); display: block; margin-bottom: 10px; text-transform: uppercase;
}
.tarjeta.acento { border-top: 5px solid var(--indigo); }
.tarjeta.fuerte { background: var(--marino); color: #fff; border-color: var(--marino); }
.tarjeta.fuerte .num { color: var(--naranja); }

.lista { display: grid; gap: 10px; }
.lista li { position: relative; padding-left: 26px; }
.lista li::before {
  content: ""; position: absolute; left: 2px; top: .62em; width: 10px; height: 10px;
  background: var(--naranja); border-radius: 2px; transform: rotate(45deg);
}
.dato { border-left: 4px solid var(--naranja); padding: 4px 0 4px 18px; margin: 0 0 22px; }
.dato dt { font-family: var(--titulo); text-transform: uppercase; letter-spacing: .1em; font-size: 14px; color: var(--gris); font-weight: 600; }
.dato dd { margin: 2px 0 0; }

.cita {
  font-family: var(--titulo); font-size: clamp(26px, 3vw, 36px); line-height: 1.15; font-weight: 600;
  border-left: 6px solid var(--naranja); padding-left: 22px; margin: 0;
}

/* Líneas */
.linea-inv { display: flex; flex-direction: column; }
.linea-inv .etiquetas { margin-top: auto; padding-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.etiqueta {
  font-size: 12.5px; font-weight: 600; background: #eceafd; color: var(--marino);
  padding: 4px 10px; border-radius: 99px; white-space: nowrap;
}
.oscura .etiqueta { background: rgba(255,255,255,.12); color: #fff; }

/* Historia */
.tiempo { position: relative; margin-left: 8px; padding-left: 30px; border-left: 3px solid rgba(255,255,255,.2); display: grid; gap: 30px; }
.tiempo li { position: relative; }
.tiempo li::before {
  content: ""; position: absolute; left: -40px; top: 6px; width: 17px; height: 17px;
  border-radius: 50%; background: var(--naranja); border: 4px solid var(--noche);
}
.tiempo time { font-family: var(--titulo); font-weight: 700; font-size: 17px; letter-spacing: .1em; text-transform: uppercase; color: var(--naranja); }
.tiempo h3 { font-size: 27px; font-weight: 700; margin: 2px 0 6px; }
.tiempo p { color: #d3d1ee; margin: 0; max-width: 46em; }

/* Junta directiva */
.presidente {
  display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 36px; align-items: center;
  background: var(--marino); color: #fff; border-radius: 20px; padding: 30px; margin-bottom: 40px;
}
.presidente img { border-radius: 14px; width: 100%; aspect-ratio: 1; object-fit: cover; }
.presidente h3 { font-size: clamp(32px, 4vw, 46px); font-weight: 800; text-transform: uppercase; }
.presidente .cargo { color: var(--naranja); font-family: var(--titulo); font-weight: 600; font-size: 20px; letter-spacing: .08em; text-transform: uppercase; margin: 6px 0 14px; }
.presidente p { color: #d6d4f2; margin: 0; }
.subtitulo { font-size: 30px; font-weight: 700; text-transform: uppercase; margin: 44px 0 20px; }
.subtitulo small { display: block; font-family: var(--texto); font-size: 15px; font-weight: 400; text-transform: none; color: var(--gris); margin-top: 6px; letter-spacing: 0; line-height: 1.5; }
.equipo { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.miembro { background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); overflow: hidden; margin: 0; }
.miembro img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #e9e9f4; }
.miembro figcaption { padding: 12px 14px 14px; }
.miembro strong { font-family: var(--titulo); font-size: 19px; font-weight: 700; text-transform: uppercase; line-height: 1.1; display: block; }
.miembro span { font-size: 13.5px; color: var(--gris); display: block; margin-top: 4px; line-height: 1.4; }
.tabla { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); overflow: hidden; }
.tabla th, .tabla td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--linea); vertical-align: top; }
.tabla tr:last-child th, .tabla tr:last-child td { border-bottom: 0; }
.tabla th { font-weight: 600; color: var(--gris); font-size: 15px; width: 46%; }
.tabla td { font-weight: 600; }
.tabla thead th { background: var(--marino); color: #fff; font-family: var(--titulo); text-transform: uppercase; letter-spacing: .08em; font-size: 16px; }

/* Actividades */
.evento { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; margin-bottom: 64px; }
.evento:last-child { margin-bottom: 0; }
.evento.invertido .medio { order: 2; }
.evento .medio img { border-radius: 16px; width: 100%; box-shadow: 0 18px 40px rgba(20,18,60,.18); }
.evento .medio.par { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.evento .medio.par img:first-child { grid-column: 1 / -1; }
.evento h3 { font-size: clamp(30px, 3.6vw, 42px); font-weight: 800; text-transform: uppercase; margin-bottom: 6px; }
.evento .fecha { font-family: var(--titulo); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--naranja-osc); font-size: 17px; margin-bottom: 14px; display: block; }
.concursos { display: grid; grid-template-columns: 1fr; gap: 0; margin: 16px 0; }
.concursos li { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--linea); padding: 6px 0; font-size: 15.5px; }
.concursos b { color: var(--indigo); white-space: nowrap; }

.curso { border-left: 5px solid var(--naranja); }
.curso h3 { font-size: 23px; }
.curso .horas { font-family: var(--titulo); font-weight: 700; font-size: 30px; color: var(--indigo); display: block; line-height: 1; margin-bottom: 8px; }

/* Logros */
.medallero { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.medallero .tarjeta { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); color: #fff; padding: 22px; }
.medallero h3 { font-size: 23px; margin-bottom: 12px; }
.medallero li { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 15px; }
.medalla { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #201400; }
.medalla.oro { background: linear-gradient(135deg, #ffe07a, #f2a900); }
.medalla.plata { background: linear-gradient(135deg, #f1f3f6, #a9b1bd); }
.medalla.bronce { background: linear-gradient(135deg, #f0b27a, #b9692b); }
.hitos { margin-top: 34px; }
.hitos .tarjeta { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); color: #fff; }
.hitos .tarjeta p { color: #d3d1ee; }

/* Aliados */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { background: #fff; border: 1px solid var(--linea); border-radius: 10px; padding: 10px 16px; font-weight: 600; font-size: 15.5px; }

/* Galería */
.galeria { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.galeria button {
  all: unset; cursor: zoom-in; position: relative; display: block; border-radius: 12px; overflow: hidden;
  aspect-ratio: 4 / 3; background: #dedcef;
}
.galeria button:focus-visible { outline: 3px solid var(--naranja); outline-offset: 3px; }
.galeria img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.galeria button:hover img { transform: scale(1.05); }
.galeria span {
  position: absolute; inset: auto 0 0 0; padding: 26px 12px 10px; font-size: 13.5px; line-height: 1.3; color: #fff; font-weight: 500;
  background: linear-gradient(transparent, rgba(8,6,40,.88));
}
.galeria .ancha { grid-column: span 2; aspect-ratio: 8 / 3; }
.visor {
  position: fixed; inset: 0; z-index: 100; background: rgba(6,4,30,.94);
  display: none; align-items: center; justify-content: center; flex-direction: column; padding: 20px;
}
.visor.abierto { display: flex; }
.visor img { max-width: min(1200px, 94vw); max-height: 80vh; border-radius: 10px; }
.visor p { color: #fff; margin: 14px 0 0; text-align: center; max-width: 60em; font-size: 15.5px; }
.visor button {
  position: absolute; background: rgba(255,255,255,.12); border: 0; color: #fff; font-size: 28px; line-height: 1;
  width: 50px; height: 50px; border-radius: 50%; cursor: pointer;
}
.visor button:hover { background: var(--naranja); color: #000; }
.visor .cerrar { top: 16px; right: 16px; }
.visor .ant { left: 14px; top: 50%; transform: translateY(-50%); }
.visor .sig { right: 14px; top: 50%; transform: translateY(-50%); }

/* Contacto */
.contacto .tarjeta { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); color: #fff; }
.correo { font-family: var(--titulo); font-size: clamp(28px, 4.4vw, 46px); font-weight: 700; color: #fff !important; text-decoration-color: var(--naranja); word-break: break-word; }
.redes { display: grid; gap: 10px; margin-top: 6px; }
.redes li { display: flex; align-items: center; gap: 12px; }
.redes svg { width: 22px; height: 22px; fill: var(--naranja); flex: none; }
.redes a { color: #fff; font-weight: 600; text-decoration-color: rgba(255,138,61,.6); }
.redes a:hover { color: var(--naranja); }
.telefono { margin-top: 22px; }
.telefono > span { display: block; font-family: var(--titulo); text-transform: uppercase; letter-spacing: .1em; font-size: 14px; color: var(--naranja); font-weight: 600; }
.telefono > a { font-family: var(--titulo); font-size: clamp(28px, 4vw, 38px); font-weight: 700; color: #fff !important; text-decoration: none; display: inline-block; margin: 2px 0 14px; }
.pie .redes-pie { display: flex; gap: 16px; flex-wrap: wrap; }
.pie .redes-pie a { color: #d6d4f2; }

.pie { background: #070522; color: #b5b2d8; padding: 34px 0; font-size: 14.5px; }
.pie .contenedor { display: flex; flex-wrap: wrap; gap: 18px 40px; align-items: center; justify-content: space-between; }
.pie img { height: 46px; width: auto; }
.pie p { margin: 0; }

.aparece { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.aparece.visto { opacity: 1; transform: none; }

/* Adaptable */
@media (max-width: 1020px) {
  .boton-menu { display: block; }
  .nav {
    position: absolute; left: 0; right: 0; top: 66px; background: var(--noche);
    border-bottom: 1px solid rgba(255,255,255,.1); display: none; padding: 10px 20px 18px;
  }
  .nav.abierta { display: block; }
  .nav ul { flex-direction: column; gap: 2px; }
  .nav a { padding: 12px 10px; font-size: 16px; }
  .nav a.cta { margin: 8px 0 0; text-align: center; }
  .portada .rejilla { grid-template-columns: 1fr; gap: 40px; }
  .cuatro, .medallero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tres { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .equipo { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .galeria { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .seccion { padding: 60px 0; }
  .portada { padding: 36px 0 52px; }
  .portada figure::before { inset: 12px -8px -8px 12px; }
  .marca span { display: none; }
  .dos, .tres, .evento, .presidente { grid-template-columns: 1fr; }
  .evento { gap: 22px; margin-bottom: 48px; }
  .evento.invertido .medio { order: 0; }
  .presidente { padding: 20px; gap: 20px; }
  .presidente img { max-width: 240px; }
  .cifras ul { grid-template-columns: repeat(2, 1fr); }
  .cifras li { padding: 18px 14px; }
  .cifras li:nth-child(odd) { border-left: 0; padding-left: 0; }
  .cifras li:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.08); }
  .cifras strong { font-size: 32px; }
  .equipo, .galeria { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .galeria .ancha { grid-column: span 2; aspect-ratio: 2 / 1; }
  .cuatro, .medallero, .concursos { grid-template-columns: 1fr; }
  .tabla th, .tabla td { display: block; width: 100%; padding: 4px 16px; border: 0; }
  .tabla th { padding-top: 14px; }
  .tabla td { padding-bottom: 14px; border-bottom: 1px solid var(--linea); }
  .tabla thead { display: none; }
  .visor .ant, .visor .sig { top: auto; bottom: 16px; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .aparece { opacity: 1; transform: none; transition: none; }
  .galeria img, .boton { transition: none; }
}
