/* DEPSIA — hoja de estilos
   Colores tomados del logo del Departamento. Tipografía: Atkinson Hyperlegible Next (alojada localmente). */

@font-face { font-family: "Atkinson Next"; src: url("../fonts/atkinson-hyperlegible-next-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Next"; src: url("../fonts/atkinson-hyperlegible-next-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Atkinson Next"; src: url("../fonts/atkinson-hyperlegible-next-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Atkinson Next"; src: url("../fonts/atkinson-hyperlegible-next-latin-ext-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0100-024F, U+1E00-1EFF; }

:root {
  --papel: #ffffff;
  --niebla: #f2f5f7;
  --linea: #dde3e8;
  --tinta: #22303c;
  --tenue: #56636f;
  --naranja: #d2622f;
  --amarillo: #e5c42f;
  --verde: #9ab648;
  --celeste: #5fa8da;
  --morado: #553a85;
  --ladrillo: #b2502f;
  --acento: var(--morado);
  --ancho: 72rem;
  --texto: 40rem;
  --radio: 0.5rem;
  font-size: 106.25%; /* 17 px */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--papel); color: var(--tinta);
  font-family: "Atkinson Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-weight: 400; line-height: 1.6; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--acento); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--celeste); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 0.6em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; line-height: 1.3; }
p { margin: 0 0 1em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saltar { position: absolute; left: 1rem; top: -4rem; background: var(--tinta); color: #fff; padding: 0.5rem 1rem; z-index: 10; border-radius: var(--radio); }
.saltar:focus { top: 1rem; }
.contenedor { width: min(100% - 2.5rem, var(--ancho)); margin-inline: auto; }
.prosa { max-width: var(--texto); }

/* ---------- Cabecera ---------- */
.cabecera { border-bottom: 1px solid var(--linea); background: var(--papel); position: sticky; top: 0; z-index: 5; }
.cabecera .contenedor { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.75rem; }
.marca img { height: 3.9rem; width: auto; }
.nav ul { list-style: none; display: flex; gap: 0.25rem; margin: 0; padding: 0; }
.nav a { display: block; padding: 0.5rem 0.75rem; color: var(--tinta); text-decoration: none; font-weight: 500; border-radius: var(--radio); }
.nav a:hover { background: var(--niebla); }
.nav a[aria-current="page"] { color: var(--acento); box-shadow: inset 0 -2px 0 var(--acento); border-radius: 0; }
.menu-movil { display: none; }
@media (max-width: 860px) {
  .nav { display: none; }
  .menu-movil { display: block; position: relative; }
  .menu-movil summary { list-style: none; cursor: pointer; padding: 0.55rem 0.9rem; border: 1px solid var(--linea); border-radius: var(--radio); font-weight: 500; }
  .menu-movil summary::-webkit-details-marker { display: none; }
  .menu-movil ul { position: absolute; right: 0; top: calc(100% + 0.5rem); background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); list-style: none; margin: 0; padding: 0.4rem; min-width: 13rem; box-shadow: 0 12px 30px rgb(34 48 60 / 0.12); }
  .menu-movil a { display: block; padding: 0.6rem 0.8rem; color: var(--tinta); text-decoration: none; }
  .marca img { height: 2.8rem; }
}

/* ---------- Portada ---------- */
.portada { position: relative; overflow: hidden; padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(3rem, 7vw, 5.5rem); }
.portada .contenedor { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 2rem; }
.portada .sigla { font-weight: 700; font-size: 1.05rem; color: var(--tenue); margin-bottom: 1rem; letter-spacing: 0.02em; }
.portada h1 { max-width: 16ch; margin-bottom: 0.5em; }
.portada .facultad { font-size: 1.2rem; color: var(--tenue); margin-bottom: 1.6rem; }
.portada .lema { font-size: 1.15rem; max-width: 34ch; border-left: 3px solid var(--naranja); padding-left: 1rem; margin-bottom: 2rem; }
.acciones { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.boton { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.3rem; border-radius: 999px; font-weight: 700; text-decoration: none; border: 2px solid var(--acento); }
.boton.primario { background: var(--acento); color: #fff; }
.boton.primario:hover { background: #45306c; border-color: #45306c; }
.boton.secundario { color: var(--acento); background: transparent; }
.boton.secundario:hover { background: #f1edf8; }

.anillo { width: 100%; max-width: 30rem; justify-self: end; aspect-ratio: 1; }
.anillo path, .anillo circle { fill: none; stroke-width: 15; stroke-linecap: round; }
.anillo .figura { stroke-width: 8; }
.anillo .punto { fill: currentColor; stroke: none; }
@media (prefers-reduced-motion: no-preference) {
  .anillo path, .anillo circle:not(.punto) { stroke-dasharray: 1; stroke-dashoffset: 1; animation: trazar 1.3s cubic-bezier(.6,.05,.3,1) forwards; animation-delay: var(--d, 0s); }
  .anillo .punto { opacity: 0; animation: aparecer .4s ease-out forwards; animation-delay: var(--d, 0s); }
  @keyframes aparecer { to { opacity: 1; } }
  @keyframes trazar { to { stroke-dashoffset: 0; } }
}
@media (max-width: 760px) {
  .portada .contenedor { grid-template-columns: 1fr; }
  .anillo { order: -1; max-width: 11rem; justify-self: start; }
}

/* ---------- Secciones ---------- */
.seccion { padding: clamp(3rem, 7vw, 5rem) 0; }
.seccion.gris { background: var(--niebla); }
.seccion-cabeza { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.seccion-cabeza h2 { margin: 0; }
.seccion-cabeza p { margin: 0.4rem 0 0; color: var(--tenue); max-width: 46rem; }
.vision { font-size: clamp(1.25rem, 2.3vw, 1.6rem); line-height: 1.5; max-width: 46rem; margin: 0; }

/* ---------- Unidades (lista con arco de color) ---------- */
.unidades { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 3rem; }
.unidades li { border-top: 1px solid var(--linea); padding: 1.5rem 0; display: grid; grid-template-columns: 2.6rem 1fr; gap: 1rem; }
.unidades .arco { width: 2.6rem; height: 2.6rem; }
.unidades h3 { margin-bottom: 0.35rem; }
.unidades h3 a { color: var(--tinta); text-decoration: none; }
.unidades h3 a:hover { color: var(--acento); text-decoration: underline; }
.unidades p { margin: 0; color: var(--tenue); }
@media (max-width: 760px) { .unidades { grid-template-columns: 1fr; } }
.arco path { fill: none; stroke: var(--c); stroke-width: 6; stroke-linecap: round; }

/* ---------- Equipo ---------- */
.equipo { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); gap: 2.5rem 1.75rem; }
.equipo.compacto { grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 2rem 1.5rem; }
.persona { display: flex; flex-direction: column; }
.foto-arco { aspect-ratio: 4 / 5; border-radius: 50% 50% var(--radio) var(--radio) / 40% 40% var(--radio) var(--radio); overflow: hidden; background: #e2e8ed; margin-bottom: 1rem; position: relative; }
.foto-arco img { width: 100%; height: 100%; object-fit: cover; }
.foto-arco .iniciales { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.4rem; font-weight: 700; color: var(--tenue); }
.persona h3 { font-size: 1.08rem; margin-bottom: 0.35rem; }
.persona h3 a { color: var(--tinta); text-decoration: none; }
.persona h3 a:hover { color: var(--acento); text-decoration: underline; }
.persona .lineas { margin: 0; padding: 0; list-style: none; color: var(--tenue); font-size: 0.94rem; line-height: 1.45; }
.ver-perfil { margin: 0.5rem 0 0; font-size: 0.94rem; font-weight: 500; }
.persona .funcion { color: var(--tenue); font-size: 0.94rem; margin: 0; }
.puntos { display: flex; gap: 0.35rem; margin-top: 0.7rem; flex-wrap: wrap; }
.puntos a { width: 0.8rem; height: 0.8rem; border-radius: 50%; background: var(--c); display: block; }
.leyenda { list-style: none; padding: 0; margin: 0 0 2.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; font-size: 0.94rem; color: var(--tenue); }
.leyenda li { display: flex; align-items: center; gap: 0.5rem; }
.leyenda span { width: 0.8rem; height: 0.8rem; border-radius: 50%; background: var(--c); flex: none; }
.leyenda a { color: var(--tenue); }

/* ---------- Páginas interiores ---------- */
.cabeza-pagina { padding: clamp(2.5rem, 6vw, 4rem) 0 2rem; border-bottom: 1px solid var(--linea); }
.cabeza-pagina h1 { max-width: 24ch; }
.cabeza-pagina .bajada { font-size: 1.2rem; color: var(--tenue); max-width: 44rem; margin: 0; }
.migas { font-size: 0.92rem; color: var(--tenue); margin-bottom: 1.2rem; }
.migas a { color: var(--tenue); }
.cabeza-unidad { border-top: 6px solid var(--c); }
.cabeza-unidad .arco { width: 3.5rem; height: 3.5rem; margin-bottom: 1rem; }

.dos-columnas { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; }
@media (max-width: 860px) { .dos-columnas { grid-template-columns: 1fr; gap: 2rem; } }
.objetivos { margin: 0; padding-left: 1.2rem; }
.objetivos li { margin-bottom: 0.7rem; padding-left: 0.3rem; }
.objetivos li::marker { color: var(--c, var(--acento)); }

/* Perfil */
.perfil { display: grid; grid-template-columns: 17rem minmax(0, 1fr); gap: 3rem; align-items: start; }
.perfil .ficha { position: sticky; top: 6.5rem; }
.perfil .ficha .lineas { list-style: none; padding: 0; margin: 0 0 1rem; color: var(--tenue); }
.perfil h2 { font-size: 1.3rem; margin-top: 2rem; }
.perfil .cuerpo p, .perfil .cuerpo li { max-width: var(--texto); }
.perfil .cuerpo ul { padding-left: 1.2rem; }
.perfil .cuerpo li { margin-bottom: 0.6rem; }
.chips { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.94rem; }
.chips a { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--tinta); }
.chips span { width: 0.75rem; height: 0.75rem; border-radius: 50%; background: var(--c); flex: none; }
@media (max-width: 760px) { .perfil { grid-template-columns: 1fr; } .perfil .ficha { position: static; max-width: 15rem; } }

/* Blog */
.entradas { list-style: none; padding: 0; margin: 0; }
.entradas li { border-top: 1px solid var(--linea); padding: 1.6rem 0; max-width: 46rem; }
.entradas h2 { font-size: 1.4rem; margin-bottom: 0.4rem; }
.entradas h2 a { color: var(--tinta); text-decoration: none; }
.entradas h2 a:hover { color: var(--acento); text-decoration: underline; }
.meta { color: var(--tenue); font-size: 0.94rem; margin-bottom: 0.6rem; }
.articulo { max-width: var(--texto); }
.articulo h2 { font-size: 1.5rem; margin-top: 2.2rem; }
.articulo h3 { margin-top: 1.6rem; }
.articulo ul { padding-left: 1.2rem; }
.articulo li { margin-bottom: 0.5rem; }

/* Contacto */
.datos { list-style: none; padding: 0; margin: 0 0 2rem; }
.datos li { padding: 0.9rem 0; border-top: 1px solid var(--linea); }
.datos strong { display: block; font-size: 0.94rem; color: var(--tenue); font-weight: 500; }
.aviso { border-left: 4px solid var(--naranja); background: #fdf3ee; padding: 1.1rem 1.25rem; border-radius: 0 var(--radio) var(--radio) 0; }
.aviso p:last-child { margin: 0; }
form .campo { margin-bottom: 1.1rem; }
form label { display: block; font-weight: 500; margin-bottom: 0.35rem; }
form .opcional { color: var(--tenue); font-weight: 400; }
input[type=text], input[type=email], input[type=tel], textarea { width: 100%; font: inherit; color: inherit; padding: 0.7rem 0.85rem; border: 1px solid #b9c3cc; border-radius: var(--radio); background: #fff; }
input:focus, textarea:focus { border-color: var(--acento); outline: 3px solid #d9cff0; outline-offset: 0; }
textarea { min-height: 9rem; resize: vertical; }
.consentimiento { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem; align-items: start; font-size: 0.94rem; }
.consentimiento input { margin-top: 0.3rem; width: 1.1rem; height: 1.1rem; accent-color: var(--acento); }
.consentimiento label { font-weight: 400; margin: 0; }
button.boton { font: inherit; font-weight: 700; cursor: pointer; }
.estado { margin-top: 1rem; font-weight: 500; }
.estado.ok { color: #2f6b1f; }
.estado.error { color: #a3361a; }
.trampa { display: none; }

/* Franja de contacto en portada */
.franja { background: var(--tinta); color: #fff; }
.franja a { color: #fff; }
.franja .contenedor { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: center; }
.franja h2 { margin-bottom: 0.4rem; }
.franja p { margin: 0; color: #d4dbe1; }
.franja .boton.primario { background: #fff; color: var(--tinta); border-color: #fff; }
.franja .boton.primario:hover { background: var(--niebla); }
@media (max-width: 760px) { .franja .contenedor { grid-template-columns: 1fr; } }

/* ---------- Pie ---------- */
.pie { border-top: 1px solid var(--linea); padding: 3rem 0 2rem; font-size: 0.94rem; color: var(--tenue); }
.pie .contenedor { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem; }
.pie .logos { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1rem; }
.pie .logos img { height: 3.6rem; width: auto; }
.pie h2 { font-size: 1rem; color: var(--tinta); margin-bottom: 0.6rem; }
.pie ul { list-style: none; margin: 0; padding: 0; }
.pie li { margin-bottom: 0.35rem; }
.pie a { color: var(--tenue); }
.pie .legal { grid-column: 1 / -1; border-top: 1px solid var(--linea); padding-top: 1.25rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }
@media (max-width: 760px) { .pie .contenedor { grid-template-columns: 1fr; } }

@media print { .cabecera, .pie, .franja, .menu-movil { display: none; } }

/* Evita que la cabecera fija tape títulos o campos al desplazarse */
h1, h2, [id], input, textarea { scroll-margin-top: 6rem; }

/* Instagram */
.ig-grilla { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.75rem; }
.ig-grilla a { display: block; position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radio); background: #e2e8ed; }
.ig-grilla img { width: 100%; height: 100%; object-fit: cover; }
.ig-grilla a:hover img { opacity: 0.88; }
.ig-video { position: absolute; top: 0.5rem; right: 0.5rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: rgb(34 48 60 / 0.65); }
.ig-video::after { content: ""; position: absolute; left: 0.6rem; top: 0.45rem; border-style: solid; border-width: 0.35rem 0 0.35rem 0.55rem; border-color: transparent transparent transparent #fff; }
@media (max-width: 900px) { .ig-grilla { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
