/*
 * AA Landing Page 9.10.3 — static project hover + natural gallery dismissal
 * Loaded last so interaction geometry stays deterministic across visual modes.
 */

/* Realisation cards keep their exact grid position on hover/press/focus.
   The existing black active treatment and gallery hint remain untouched. */
.aail-site .aail-project-card.aail-is-clickable,
.aail-fragment .aail-project-card.aail-is-clickable,
.aail-site .aail-project-card.aail-has-gallery,
.aail-fragment .aail-project-card.aail-has-gallery {
  will-change: auto !important;
}

.aail-site .aail-project-card.aail-is-clickable:hover,
.aail-site .aail-project-card.aail-is-clickable:active,
.aail-site .aail-project-card.aail-is-clickable:focus-visible,
.aail-fragment .aail-project-card.aail-is-clickable:hover,
.aail-fragment .aail-project-card.aail-is-clickable:active,
.aail-fragment .aail-project-card.aail-is-clickable:focus-visible,
.aail-site .aail-project-card.aail-has-gallery:hover,
.aail-site .aail-project-card.aail-has-gallery:active,
.aail-site .aail-project-card.aail-has-gallery:focus-visible,
.aail-fragment .aail-project-card.aail-has-gallery:hover,
.aail-fragment .aail-project-card.aail-has-gallery:active,
.aail-fragment .aail-project-card.aail-has-gallery:focus-visible,
.aail-visual-studio-hybrid .aail-project-card.aail-has-gallery:hover,
.aail-visual-studio-hybrid .aail-project-card.aail-has-gallery:active {
  transform: none !important;
}

/* No fake elevation: hover communicates selection through the existing black
   information surface, not by lifting the complete card away from the grid. */
.aail-site .aail-project-card.aail-has-gallery:hover,
.aail-fragment .aail-project-card.aail-has-gallery:hover,
.aail-site .aail-project-card.aail-is-clickable:hover,
.aail-fragment .aail-project-card.aail-is-clickable:hover,
.aail-visual-studio-hybrid .aail-project-card.aail-has-gallery:hover {
  box-shadow: none !important;
}

/* Gallery photo can be physically thrown away. The visual image remains
   uncropped; JS distinguishes its real contain-box from the blurred margins. */
.aail-lightbox .aail-lightbox-still {
  transform-origin: 50% 50% !important;
  -webkit-user-drag: none;
  user-select: none;
  cursor: grab !important;
  touch-action: none !important;
}

.aail-lightbox.is-dismiss-dragging .aail-lightbox-still {
  cursor: grabbing !important;
  transition: none !important;
}

.aail-lightbox.is-dismiss-throwing .aail-lightbox-still {
  pointer-events: none !important;
}

/* Background / empty image margins are now a deliberate close zone. */
.aail-lightbox .aail-lightbox-figure {
  cursor: default !important;
}

.aail-lightbox .aail-lightbox-backdrop,
.aail-detail-runtime-backdrop {
  cursor: zoom-out !important;
}

/* Small information card controls: one quiet glass capsule with drawn icons,
   instead of three unrelated typographic glyph buttons. */
.aail-lightbox-info-actions {
  gap: 2px !important;
  padding: 3px !important;
  border: 1px solid var(--aail-lb-line) !important;
  border-radius: 999px !important;
  background: var(--aail-lb-glass-strong) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.12) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
  backdrop-filter: blur(18px) saturate(1.12);
}

.aail-lightbox-info-toggle,
.aail-lightbox-info-hide {
  position: relative !important;
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  font-size: 0 !important;
  line-height: 0 !important;
  transform: none !important;
}

.aail-lightbox-info-toggle:hover,
.aail-lightbox-info-toggle:focus-visible,
.aail-lightbox-info-hide:hover,
.aail-lightbox-info-hide:focus-visible {
  background: rgba(127,127,127,.13) !important;
  transform: none !important;
  outline: none !important;
}

.aail-lightbox-info-toggle::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translate(-50%, -66%) rotate(45deg);
  transition: transform .24s cubic-bezier(.2,.8,.2,1);
}

.aail-lightbox-info-toggle[data-aail-info-state="expand"]::before {
  transform: translate(-50%, -34%) rotate(225deg);
}

.aail-lightbox-info-hide::before,
.aail-lightbox-info-hide::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 11px;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
}
.aail-lightbox-info-hide::before { transform: translate(-50%, -50%) rotate(45deg); }
.aail-lightbox-info-hide::after  { transform: translate(-50%, -50%) rotate(-45deg); }

.aail-lightbox-info-restore {
  width: 38px !important;
  height: 38px !important;
  border-radius: 999px !important;
  font-size: 0 !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.14) !important;
}
.aail-lightbox-info-restore::before {
  content: "i";
  display: block;
  font-family: ui-serif, Georgia, serif;
  font-size: 17px;
  font-style: italic;
  line-height: 1;
}

/* Keep the global close control as an accessibility/fallback path, but make it
   visually quieter now that click-outside and throw-away both close the view. */
.aail-lightbox-close {
  box-shadow: 0 8px 24px rgba(0,0,0,.14) !important;
}

@media (hover: none), (pointer: coarse) {
  .aail-lightbox .aail-lightbox-still { cursor: default !important; }
}

@media (prefers-reduced-motion: reduce) {
  .aail-lightbox .aail-lightbox-still { transition: none !important; }
}
