.abre-document-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 22, 13, .88);
  backdrop-filter: blur(8px);
}
.abre-document-modal[hidden] { display: none; }
.abre-document-dialog {
  position: relative;
  width: min(980px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: #fafaf7;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .42);
}
.abre-document-dialog img {
  display: block;
  width: 100%;
  height: auto;
}
.abre-document-close {
  position: sticky;
  top: 12px;
  float: right;
  z-index: 2;
  width: 42px;
  height: 42px;
  margin: 12px 12px -54px 0;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 50%;
  background: rgba(27,51,34,.9);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.abre-brochure-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border: 1px solid #1b3322;
  color: #1b3322;
  background: transparent;
  font-family: var(--font-body);
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.abre-brochure-link:hover { background: #1b3322; color: #fafaf7; }
body.abre-modal-open { overflow: hidden; }
@media (max-width: 600px) {
  .abre-document-modal { padding: 12px; }
  .abre-document-dialog { max-height: calc(100vh - 24px); }
}

/* Ajuste: documentos completos dentro de la pantalla */
.abre-document-dialog {
  width: fit-content;
  max-width: min(980px, 100%);
  overflow: hidden;
}
.abre-document-dialog img {
  width: auto;
  height: auto;
  max-width: min(980px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  object-fit: contain;
}
@media (max-width: 600px) {
  .abre-document-dialog img {
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
  }
}



/* ABRE_MOBILE_MOTION_STYLES */
@media (prefers-reduced-motion: no-preference) {
  body.abre-route-enter .abre-page {
    animation: abre-route-enter .44s cubic-bezier(.22,.61,.36,1) both;
  }
  @keyframes abre-route-enter {
    from { opacity:.18; transform:translateY(10px); }
    to { opacity:1; transform:translateY(0); }
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior:auto!important;
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
  }
}

/* ABRE_REFINED_MOTION: subtle, one-time animations; content stays visible if JS fails. */
@media (prefers-reduced-motion: no-preference) {
  .abre-page .abre-motion-item.abre-motion-play { animation: abre-content-arrive .62s cubic-bezier(.22,1,.36,1) var(--abre-motion-delay,0ms) backwards; }
  .abre-page img.abre-motion-image.abre-motion-play { animation: abre-image-arrive .85s cubic-bezier(.22,1,.36,1) backwards; }
  .abre-page button,.abre-page a { transition:transform .2s ease,background-color .2s ease,color .2s ease,box-shadow .25s ease; }
  .abre-page .abre-motion-card { transition:transform .28s ease,box-shadow .28s ease; }
  @keyframes abre-content-arrive { from {opacity:0;transform:translateY(18px)} to {opacity:1;transform:translateY(0)} }
  @keyframes abre-image-arrive { from {opacity:.55;transform:scale(.975)} to {opacity:1;transform:scale(1)} }
  @media (hover:hover) and (pointer:fine) {
    .abre-page .abre-motion-card:has(a):hover,.abre-page .abre-motion-card[style*="cursor: pointer"]:hover,.abre-page a.abre-motion-card:hover { transform:translateY(-3px);box-shadow:0 10px 26px rgba(27,51,34,.09); }
  }
  @media (hover:none) and (pointer:coarse) {
    .abre-page button:active,.abre-page a:active { transform:scale(.975); }
    .abre-page .abre-motion-card:has(a):active { transform:scale(.99); }
  }
}
.abre-page button,.abre-page a { -webkit-tap-highlight-color:rgba(196,154,40,.13); }
@media (prefers-reduced-motion:reduce) {
  .abre-page .abre-motion-item,.abre-page .abre-motion-image,.abre-page .abre-reveal {animation:none!important;transform:none!important;opacity:1!important;transition:none!important;}
}

/* October 28: consistent brand alignment and visible mobile portraits. */
footer .abre-footer-brand{align-items:center!important;text-align:center!important;justify-self:center!important;margin-inline:auto!important;min-width:0}
footer .abre-footer-brand>img{margin-inline:auto!important}
footer .abre-footer-brand>div{justify-content:center!important}
@media(max-width:767px){body .abre-page img.abre-dynamic-item[alt^="Alex Barba"]{opacity:1!important;animation:none!important;transform:none!important}footer .abre-footer-brand{max-width:300px!important}}
