/* WONE animated isometric illustrations (src/pages/illustrations.mjs + /assets/js/anim-svg.js). */
.anim-pic { display: block; position: relative; width: 100%; line-height: 0; color-scheme: dark; }
.anim-pic > svg { display: block; width: 100%; height: auto; }

/* Card: 800×500 artwork, keeps its ratio. */
.anim-pic.is-card { aspect-ratio: 8 / 5; background: #0a1813; overflow: hidden; }
.anim-pic.is-card > svg { height: 100%; }

/* Hero: fills its positioned parent (e.g. an absolutely placed media layer) and slices like
   object-fit: cover anchored right, so the subject stays in view and the calm left side is cropped first.
   Without a sized parent it falls back to the 3:1 artwork ratio. */
.anim-pic.is-hero { height: 100%; min-height: inherit; aspect-ratio: 3 / 1; background: #07120f; overflow: hidden; }
.anim-pic.is-hero > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Narrow screens: keep the full height and centre the subject (about two thirds across the artwork)
   instead of showing only the right edge. */
@media (max-width: 760px) {
  .anim-pic.is-hero > svg {
    inset: 0 auto 0 50%; width: auto; min-width: 100%; height: 100%; aspect-ratio: 3 / 1;
    transform: translateX(var(--anim-focus, -66%));
  }
}

/* HUD hit targets placed by anim-svg.js over each in-picture dashboard. */
.anim-hud-btn {
  position: absolute; z-index: 2; margin: 0; padding: 0; border: 0; border-radius: 12px;
  background: transparent; cursor: zoom-in; line-height: normal;
  transition: box-shadow .2s, background-color .2s;
}
.anim-hud-btn:hover { background: rgb(216 243 106 / .06); box-shadow: 0 0 0 1px rgb(216 243 106 / .45); }
.anim-hud-btn:focus-visible { outline: 2px solid #d8f36a; outline-offset: 3px; }
.anim-hud-btn[hidden] { display: none; }
@media (hover: none) { .anim-hud-btn { cursor: pointer; } }

/* Enlarged HUD dialog. */
.anim-hud-zoom {
  width: min(92vw, 720px); max-height: 92vh; padding: 0; border: 1px solid #2c5a47; border-radius: 16px;
  background: #07120f; color: #e6f2ec; box-shadow: 0 30px 80px -20px rgb(0 0 0 / .7); overflow: hidden;
}
.anim-hud-zoom::backdrop { background: rgb(4 10 8 / .72); backdrop-filter: blur(3px); }
.anim-hud-zoom[open] { animation: anim-hud-in .28s cubic-bezier(.2, .7, .2, 1); }
.anim-hud-zoom .hz-head { display: flex; align-items: center; justify-content: flex-end; padding: 10px 10px 0; }
/* The enlarged dashboard carries its own title; the heading names the dialog for assistive technology. */
.anim-hud-zoom .hz-title { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.anim-hud-zoom .hz-close {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none; border: 1px solid #2c5a47; border-radius: 10px;
  background: #10231c; color: #e6f2ec; font: inherit; font-size: 20px; line-height: 1; cursor: pointer;
}
.anim-hud-zoom .hz-close:hover { background: #183129; }
.anim-hud-zoom .hz-close:focus-visible { outline: 2px solid #d8f36a; outline-offset: 2px; }
.anim-hud-zoom .hz-body { padding: 4px 14px 16px; }
.anim-hud-zoom .hz-body svg { display: block; width: 100%; height: auto; max-height: calc(92vh - 80px); }
@keyframes anim-hud-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .anim-hud-zoom[open] { animation: none; } }
