/** WP-IMG **/
.wp-caption {
  max-width: 100%;
}
img.alignright,
.wp-caption.alignright {
  float: right;
  margin: 0 0 1em 1em;
}
img.alignleft,
.wp-caption.alignleft {
  float: left;
  margin: 0 1em 1em 0;
}
img.aligncenter,
.wp-caption.aligncenter {
  display: block;
  margin-inline-start: auto;
  margin-inline-end: auto;
}
img .wp-caption-text,
.wp-caption .wp-caption-text {
  font-size: 0.5em;
}
a {
  color: inherit;
  transition: 0.1s color ease-in;
}
a:hover {
  color: #323232;
  text-decoration: none;
}
a[href*="mailto:"] {
  line-break: anywhere;
}
a img.alignright {
  float: right;
  margin: 0 0 1em 1em;
}
a img.alignleft {
  float: left;
  margin: 0 1em 1em 0;
}
a img.aligncenter {
  display: block;
  margin-inline-start: auto;
  margin-inline-end: auto;
}
a.link-icon:has(span) .bi {
  display: inline-block;
  height: 1em;
}
/** END WP-IMG **/
/* General properties */
body {
  font-family: 'ABC Diatype Mono', 'sans-serif', sans-serif;
  color: #323232;
  scroll-behavior: smooth;
  background-image: url('../img/bg.jpg');
  background-repeat: repeat;
  background-attachment: fixed;
  /*background: linear-gradient(45deg, rgba(255, 255, 255, 0.8), rgba(240, 240, 240, 0.8));
    background-size: 100% 100%;*/
}
body #main-content {
  overflow: hidden;
  touch-action: none;
}
@supports (-webkit-touch-callout: none) {
  body {
    background: transparent;
    position: relative;
  }
  body:before {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    position: fixed;
    background-image: url('../img/bg.jpg');
    background-repeat: repeat;
    z-index: 0;
  }
}
.preload {
  background-color: #F7F7F7;
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  opacity: 1;
}
.preload:before {
  content: "";
  background-image: url(../img/precharge.gif);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 30%;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  position: fixed;
}
@media (width > 1300px) {
  .preload:before {
    background-size: 10%;
  }
}
.preload.close {
  animation: closeBackdrop 1.5s 1.1s linear forwards;
}
.preload.close:before {
  animation: closeBackdrop 1.2s linear forwards;
}
header {
  position: fixed;
  top: 3em;
  left: 0;
  width: 100%;
  z-index: 2;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
}
@media (width > 1300px) {
  header {
    top: 0;
  }
}
header .logo,
header .about-link {
  padding: 15px;
  font-size: 10px;
  line-height: 12px;
}
header .logo > *,
header .about-link > * {
  margin-block-end: 4px;
}
header .logo > *:nth-child(2),
header .about-link > *:nth-child(2) {
  margin-inline-start: 6em;
}
@media (width > 1300px) {
  header .logo,
  header .about-link {
    font-size: 10px;
  }
  header .logo > *:nth-child(2),
  header .about-link > *:nth-child(2) {
    margin-inline-start: 0;
    font-weight: 700;
  }
  header .logo > *:nth-child(3),
  header .about-link > *:nth-child(3) {
    margin-inline-start: 12em;
  }
  header .logo > *:nth-child(4),
  header .about-link > *:nth-child(4) {
    margin-inline-start: 19.5em;
  }
  header .logo br,
  header .about-link br {
    margin-block: 1em;
  }
}
header .social-link {
  display: none;
  z-index: 2;
}
@media (width > 1300px) {
  header .social-link {
    display: block;
    width: 54px;
    height: 54px;
    background-image: url('../img/cara-grito.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    margin-block-start: 35px;
    margin-inline-end: 54px;
  }
}
.container {
  max-width: 100%;
  width: 80vw;
  margin: 0 auto;
}
@media (width > 1300px) {
  .container {
    width: 1200px;
  }
}
.empty-space {
  width: 100%;
  min-height: 110vh;
}
.projects-spacer {
  width: 100%;
  min-height: 50vh;
}
#main-content > .empty-space:first-of-type {
  min-height: 90vh;
}
@media (width <= 1330px) {
  #main-content > .empty-space:first-of-type {
    min-height: 75vh;
  }
}
/* Grito logo */
.bg-logo {
  position: fixed;
  max-width: 38vw;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
}
@media (width > 1300px) {
  .bg-logo {
    max-width: 50vw;
  }
}
/* Floating links */
.start-link,
.end-link {
  font-size: 14px;
  line-height: 16px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: #323232;
  text-align: center;
  font-weight: bold;
  position: fixed;
  z-index: 1;
  width: 100vw;
  line-height: 10vh;
}
@media (width > 1300px) {
  .start-link,
  .end-link {
    top: 0;
    width: 3vw;
    height: 100vh;
    line-height: 16px;
    padding-block-start: 10px !important;
  }
}
.start-link {
  top: 0;
  left: 0;
  text-decoration: underline;
  padding-block-start: 1.5em;
  line-height: 1;
}
.start-link a:hover {
  color: #9FA3F6;
  text-decoration: underline;
}
@media (width > 1300px) {
  .start-link {
    writing-mode: sideways-lr;
  }
}
.end-link {
  right: 0;
  background: transparent linear-gradient(0, #9FA3F6 25%, #FFFFFF00 100%) 0% 0% no-repeat padding-box;
  background-blend-mode: multiply;
}
.end-link a:hover {
  color: #EE0000;
}
@media (width <= 1300px) {
  .end-link {
    bottom: 0;
  }
}
@media (width > 1300px) {
  .end-link {
    writing-mode: sideways-rl;
    background: url('../img/bg.jpg'), transparent linear-gradient(270deg, #9FA3F6 0%, #FFFFFF00 100%) 0% 0% no-repeat padding-box;
  }
}
/* Floating menus */
.left-menu,
.right-menu {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}
.left-menu {
  left: 5px;
}
.right-menu {
  right: 15px;
}
@media (width > 1300px) {
  .left-menu {
    left: 3vw;
  }
  .right-menu {
    right: 3vw;
  }
}
.floating-menu {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 20vw;
}
@media (width <= 1300px) {
  .floating-menu .menu-item {
    max-width: 12vw;
  }
}
.floating-menu .menu-link {
  font-size: 14px;
  display: block;
  width: 3em;
  word-break: break-all;
  text-transform: uppercase;
  text-align: center;
  padding-inline: 1em;
  position: relative;
}
.floating-menu .menu-link .full-item {
  position: absolute;
  left: -1.5em;
  top: 0;
  white-space: break-spaces;
  word-break: keep-all;
  display: block;
  width: 6em;
  opacity: 0;
  transition: opacity 0.2s linear;
  color: #9FA3F6;
  pointer-events: none;
}
.floating-menu .menu-link:hover .full-item {
  opacity: 1;
}
@media (width > 1300px) {
  .floating-menu .menu-link {
    width: 6em;
    padding-inline: 2.5em;
  }
  .floating-menu .menu-link .full-item {
    left: 0;
  }
}
/* Projects */
.container {
  overflow: hidden;
  overscroll-behavior: contain;
  /* clave para que no haga scroll en el body estando aquí */
}
.container.posts-container {
  touch-action: none;
}
.projects.posts-grid {
  display: flex;
  row-gap: 4px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  will-change: transform;
  transform: 0.3s ease-out;
}
.projects.posts-grid .project-item {
  position: relative;
  width: 50vw;
  max-width: 100%;
  overflow: hidden;
}
.projects.posts-grid .project-item.big {
  width: 95vw;
}
.projects.posts-grid .project-item .project-title {
  display: none;
}
.projects.posts-grid .project-item .project-media > img {
  width: 100%;
  height: auto;
  object-fit: contain;
}
.projects.posts-grid .project-item .project-media [src$=".gif"] {
  display: none;
  position: absolute;
  top: -2px;
  left: 0;
  width: 100%;
  height: 100%;
}
.projects.posts-grid .project-item .project-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: transparent;
}
.projects.posts-grid .project-item:hover .project-media [src$=".gif"] {
  display: block;
}
@media (width > 1300px) {
  .projects.posts-grid .project-item {
    width: 384px;
    height: auto;
  }
  .projects.posts-grid .project-item.big {
    width: 777px;
  }
  .projects.posts-grid .project-item.vertical {
    width: 245px;
  }
}
footer .copyright {
  position: fixed;
  bottom: 15px;
  left: 15px;
  font-size: 10px;
  line-height: 1.2;
  vertical-align: middle;
}
footer .copyright > img {
  max-width: 100%;
  display: inline;
  vertical-align: inherit;
  margin-block-start: -5px;
}
footer .copyright a {
  text-transform: uppercase;
  text-decoration: underline;
}
footer .copyright a:hover {
  color: #9FA3F6;
}
@media (width <= 1300px) {
  footer .copyright {
    writing-mode: sideways-lr;
  }
}
/* Default page template */
.page-template-default article {
  margin-block: 25vh;
}
.page-template-default article h1 {
  margin-block-end: 1.2em;
  font-size: 1.4em;
}
.page-template-default article p {
  margin-block-end: 1.2em;
}
/* POPUPS */
.popup-container {
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: 10;
  top: 0;
  left: 0;
  background-color: rgba(246, 246, 246, 0.6);
  backdrop-filter: blur(8px);
  animation: 1s openBackdrop linear forwards;
}
.popup-container .popup-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 0 auto;
  width: calc(100vw - 40px);
  height: 100%;
}
@media (width > 1300px) {
  .popup-container .popup-content {
    width: 500px;
  }
}
.popup-container .popup-content [href="#close"] {
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  letter-spacing: 0.4px;
}
.popup-container .popup-content .popup-img {
  width: 100%;
  height: auto;
}
.popup-container.close {
  animation: closeBackdrop 1.5s linear forwards;
}
@keyframes openBackdrop {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes closeBackdrop {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
@keyframes openContent {
  0% {
    opacity: 0;
    transform: scale(0.1);
  }
  25% {
    opacity: 0;
    transform: scale(0.1);
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes closeContent {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  25% {
    opacity: 0.5;
  }
  50% {
    opacity: 0;
    transform: scale(0.1);
  }
  100% {
    opacity: 0;
    transform: scale(0.1);
  }
}
