/* ==========================================================================
   AURA LAB · estilos del sitio
   Aquí se cambian colores, tipografía y tamaños de toda la web.
   ========================================================================== */

/* Tipografía Montserrat (licencia libre SIL OFL, ver css/fonts/OFL.txt), alojada en el propio sitio.
   Un solo archivo variable cubre los pesos 400 a 700. */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/montserrat-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Colores */
  --tinta: #191919;          /* títulos, menú activo */
  --gris: #999999;           /* menú inactivo, fechas, pie de página */
  --texto: #a9a9a9;          /* párrafos (igual que en Adobe; se puede oscurecer para leer mejor) */
  --subtitulo: #333333;      /* subtítulos dentro de los proyectos */
  --fondo: #ffffff;
  --panel: #f2f2f2;          /* caja gris de las portadas */
  --boton: #222222;
  --oscuro-portada: .6;      /* qué tan oscura se pone una portada al pasar el mouse (0 = nada, 1 = negro) */

  /* Tipografía */
  --fuente: "Montserrat", "Helvetica Neue", Arial, sans-serif;

  /* Medidas */
  --ancho-sitio: 1152px;     /* ancho máximo del contenido en pantallas grandes */
  --alto-cabecera: 100px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  background: var(--fondo);
  color: var(--tinta);
  font-family: var(--fuente);
  font-size: 16px;
  line-height: 20px;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }

/* ---------- Contenedor general ---------- */
.contenedor {
  width: 80%;
  max-width: var(--ancho-sitio);
  margin: 0 auto;
}

/* ---------- Cabecera ---------- */
.cabecera {
  position: relative;
  height: var(--alto-cabecera);
  padding-top: 30px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.nav { display: flex; align-items: center; }
.nav-item { padding-right: 20px; }
.nav-item a {
  color: var(--gris);
  font-size: 17px;
  line-height: 30px;
  font-weight: 400;
  transition: color .2s ease;
}
.nav-item a:hover { color: var(--tinta); }
.nav-item a.activo { color: var(--tinta); font-weight: 500; }

.logo { display: block; }
.logo img { max-height: 70px; width: auto; }

.social { font-size: 0; }
.social li { display: inline-block; }
.social a { display: block; text-align: center; }
.social svg { width: 30px; height: 30px; fill: var(--tinta); vertical-align: middle; }

.social-cabecera { justify-self: end; }
.social-cabecera li { padding-left: 10px; }

.hamburguesa, .menu-movil { display: none; }

/* ---------- Encabezado de cada página ---------- */
.encabezado-pagina {
  margin: 60px auto 60px;
  max-width: 620px;
  padding: 10px 0;
  text-align: center;
}
.encabezado-pagina h1 {
  margin: 0;
  font-size: 25px;
  line-height: 27px;
  font-weight: 700;
  color: var(--tinta);
}
.separador-superior { height: 60px; }

/* ---------- Portadas (página de inicio / Work) ---------- */

.portada {
  display: flex;
  align-items: stretch;
  height: 450px;
  margin: 30px 0 20px;
}
.portada:nth-child(even) { flex-direction: row-reverse; }

.portada-img {
  position: relative;
  width: 60.1%;
  overflow: hidden;
  background: rgba(0, 0, 0, .03);
}
.portada-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.portada-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--tinta);
  opacity: 0;
  transition: opacity .25s ease;
}
.portada:hover .portada-img::after,
.portada:focus-visible .portada-img::after { opacity: var(--oscuro-portada); }

/* texto "VER MÁS" centrado sobre la imagen, aparece al pasar el mouse */
.portada-ver {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .25em;
  text-indent: .25em;        /* compensa el espacio final del letter-spacing para centrarlo bien */
  text-transform: uppercase;
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}
.portada:hover .portada-ver,
.portada:focus-visible .portada-ver { opacity: 1; }
.portada:focus-visible { outline: 3px solid var(--tinta); outline-offset: 3px; }

.portada-datos {
  display: flex;
  align-items: center;
  width: 39.9%;
  background: var(--panel);
  transition: background-color .2s ease;
}
.portada-datos-in { width: 100%; padding: 6% 8%; text-align: center; }
.portada-titulo {
  color: var(--tinta);
  font-size: 20px;
  line-height: 24px;
  font-weight: 500;
  padding-bottom: 3px;
  transition: color .2s ease;
}
.portada-fecha { color: var(--gris); font-size: 14px; line-height: 18px; }
.portada:hover .portada-datos { background: var(--tinta); }
.portada:hover .portada-titulo { color: #fff; }

/* ---------- Páginas de proyecto: bloques ---------- */
.modulo { width: 100%; }

.modulo.imagen { padding-bottom: 20px; }
.modulo.imagen img { width: 100%; }

.modulo.texto {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 0 40px;
}
.rich div { color: var(--texto); font-size: 16px; line-height: 20px; font-weight: 400; padding-bottom: 10px; }
.rich .sub-title { color: var(--subtitulo); font-size: 25px; line-height: 30px; font-weight: 700; padding-bottom: 40px; }

/* galerías: filas de imágenes con 8px de separación */
.modulo.galeria { padding-bottom: 40px; }
.galeria-grid { display: flex; margin: 0 -4px; }
.galeria-item { min-width: 0; padding: 4px; }
.galeria-item img { width: 100%; }

/* columnas */
.modulo.columnas { display: flex; }
.columna { min-width: 0; }
.columna:not(:first-child) { padding-left: 4px; }
.columna:not(:last-child) { padding-right: 4px; }
.alinea-top { align-items: flex-start; }
.alinea-center { align-items: center; }
.alinea-bottom { align-items: flex-end; }
.columnas .modulo.texto { max-width: none; margin: 0; padding: 20px 40px 20px 0; }

/* ---------- Contacto ---------- */
.botones { padding-bottom: 20px; }
.modulo.boton { padding: 20px 0; text-align: center; }
.boton-pill {
  display: inline-block;
  min-width: 127px;
  padding: 0 30px;
  height: 40px;
  line-height: 40px;
  border-radius: 100px;
  background: var(--boton);
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 700;
  transition: opacity .2s ease;
}
.boton-pill:hover { opacity: .8; }

/* ---------- Pie de página ---------- */
.pie {
  clear: both;
  padding: 130px 0;
  text-align: center;
  color: var(--gris);
  font-size: 16px;
  line-height: 30px;
}
.social-pie { margin-bottom: 0; }
.social-pie li { padding: 0 15px 30px 0; }
.social-pie li:last-child { padding-right: 0; }
.pie-texto { color: var(--gris); }

/* ---------- Botón volver arriba ---------- */
.subir {
  position: fixed;
  right: 40px;
  bottom: 40px;
  z-index: 3;
  width: 60px;
  height: 60px;
  border-radius: 60px;
  background: rgba(145, 145, 145, .2);
  color: #212121;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .25s ease, background-color .2s ease;
}
.subir svg { width: 24px; height: 24px; opacity: .45; }
.subir.visible { display: flex; opacity: 1; }
.subir:hover { background: rgba(145, 145, 145, .3); }

/* ---------- Pantallas medianas ---------- */
@media (max-width: 1100px) {
  .portada { height: 360px; }
}

/* ---------- Celular y tablet ---------- */
@media (max-width: 932px) {
  .contenedor { width: 100%; max-width: none; padding: 0 20px; }

  .cabecera { height: 90px; padding-top: 0; display: flex; justify-content: center; margin: 0 -20px; overflow: visible; }
  .nav, .social-cabecera { display: none; }
  .logo img { max-height: 60px; }

  .hamburguesa {
    display: block;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
  }
  .hamburguesa i { display: block; height: 2px; margin-bottom: 4px; background: var(--tinta); }
  .hamburguesa i:last-child { margin-bottom: 0; }

  .menu-movil {
    position: fixed;
    inset: 0;
    z-index: 10;
    padding: 110px 20px 40px;
    background: var(--fondo);
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
  }
  .menu-abierto .menu-movil { display: flex; }
  .menu-abierto { overflow: hidden; }
  .menu-movil .nav-item { display: block; padding: 0 0 30px; text-align: center; }
  .menu-movil .nav-item a { font-size: 22px; line-height: 32px; }
  .menu-movil .social li { padding: 0 10px; }
  .menu-movil .social svg { width: 32px; height: 32px; }
  /* la cabecera queda por encima del menú para poder cerrarlo */
  .menu-abierto .cabecera { position: fixed; top: 0; left: 0; right: 0; z-index: 11; margin: 0; background: var(--fondo); }

  .encabezado-pagina { margin: 30px auto; }
  .separador-superior { height: 20px; }
  .modulo.texto { padding: 10px 0 30px; }

  .portada, .portada:nth-child(even) { display: block; height: auto; margin: 20px 0 20px; }
  .portada-img { width: 100%; aspect-ratio: 4 / 3; }
  .portada-datos { width: 100%; }
  .portada-datos-in { padding: 24px 8%; }
  .portada-titulo { font-size: 17px; line-height: 20px; }

  /* columnas: se apilan en pantallas angostas, salvo las que tienen sólo imágenes */
  .columnas .modulo.texto { padding: 10px 0 30px; }

  .pie { padding: 48px 0; font-size: 14px; line-height: 20px; }
  .subir { display: none !important; }
}

@media (max-width: 640px) {
  .modulo.columnas:has(.texto) { display: block; }
  .modulo.columnas:has(.texto) .columna { flex: none !important; }
}
