/* AK base: structure and access only. Colours, type and motion belong to the skin. */
@view-transition { navigation: auto; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100svh; background: var(--ak-bg, #0b0b0b); color: var(--ak-ink, #f2f2f2); }
img, video, canvas, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ak-focus, currentColor); outline-offset: 3px; }
.ak-skip { position: absolute; left: 8px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--ak-ink, #fff); color: var(--ak-bg, #000); }
.ak-skip:focus { top: 8px; }
.ak-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Cards: the media box takes the film's own ratio, a missing poster paints the film's colour. */
.ak-cards { list-style: none; margin: 0; padding: 0; }
.ak-card { position: relative; }
.ak-card__link { display: block; text-decoration: none; }
.ak-card__media { position: relative; display: block; aspect-ratio: var(--ratio, .5625); overflow: hidden; background: var(--tint, #111); }
.ak-card__media > img, .ak-card__media > .ak-loop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ak-card__media > .ak-loop { opacity: 0; transition: opacity .4s; }
.ak-card.is-playing .ak-loop { opacity: 1; }
.ak-card__noposter { position: absolute; inset: 0; }
.ak-card__title { display: block; overflow-wrap: anywhere; }

/* Player dialog */
.ak-player { width: min(92vw, 1400px); max-height: 92vh; padding: 0; border: 0; background: #000; color: #fff; }
.ak-player::backdrop { background: rgba(0, 0, 0, .86); }
.ak-player__frame { aspect-ratio: var(--ratio, 1.7778); max-height: 86vh; margin: 0 auto; display: grid; place-items: center; }
.ak-player__frame wistia-player { width: 100%; height: 100%; display: block; }
.ak-player__close { position: absolute; top: 8px; right: 8px; padding: 8px 14px; background: rgba(0, 0, 0, .6); border: 1px solid rgba(255, 255, 255, .4); cursor: pointer; }
.ak-player__wait { padding: 40px; text-align: center; }

/* Motion off: nothing ambient moves. Skins add their own still states on top. */
.ak-reduced *, .ak-paused [data-ak-ambient], .ak-paused [data-ak-ambient] * { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
