@font-face {
  font-family: 'PT Sans';
  src: url('i/fonts/pt-sans-regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'PT Sans';
  src: url('i/fonts/pt-sans-bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'PT Sans Narrow';
  src: url('i/fonts/pt-sans-narrow-regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'PT Sans Narrow';
  src: url('i/fonts/pt-sans-narrow-bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  height: 100%;
  overflow-x: hidden;
  background: #fff;
  color: #666;
  font-family: 'PT Sans', sans-serif;
}
body { margin: 0; }
img {
  max-width: 100%;
  height: auto;
  border: 0;
  image-rendering: -moz-crisp-edges;
  image-rendering: -webkit-optimize-contrast;
}
a { text-decoration: none; }
a > img { transition: opacity .2s; }
a > img:hover { opacity: .8; }
:focus-visible { outline: 2px solid #b94d00; outline-offset: 3px; }

#site-header {
  position: fixed;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  width: 100px;
  min-height: 100%;
  padding: 20px 18px 18px;
  background: #fff;
  box-shadow: 0 0 25px rgb(0 0 0 / 30%);
  z-index: 10;
}
.hspace { display: inline-block; }
.snavb img:hover { opacity: .7; }
.container { margin-left: 100px; padding: 40px; }
.wrap { width: 100%; margin: 0 auto; }
.wrap::after { display: table; clear: both; content: ''; }
.text-center { text-align: center; }

#box-container { list-style: none; margin: 0; padding: 0; }
.box {
  position: relative;
  float: left;
  width: 31.3%;
  margin: 0 3% 2.5%;
}
.box:nth-child(3n+1) { clear: left; margin-left: 0; }
.box:nth-child(3n+2) { margin-inline: 0; }
.box:nth-child(3n) { margin-right: 0; }
.tile {
  --thumbnail-fade: .32s;
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f2f2f2;
  border-radius: 10px;
}
.tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tile.is-loading img, .tile.is-missing img { opacity: 0; }
.tile.is-loaded {
  border-radius: 0;
  box-shadow: 0 0 25px rgb(0 0 0 / 30%);
  animation: thumbnail-shadow var(--thumbnail-fade) ease-out;
}
.tile.is-loaded img { animation: thumbnail-in var(--thumbnail-fade) ease-out; }
.tile.is-loading.in-view::before {
  position: absolute;
  inset: 0;
  content: '';
  pointer-events: none;
  background: #d9d9d9;
  animation: thumbnail-pulse .85s ease-in-out infinite alternate;
}
@keyframes thumbnail-in { from { opacity: 0; } }
@keyframes thumbnail-shadow { from { box-shadow: 0 0 25px rgb(0 0 0 / 0%); } }
@keyframes thumbnail-pulse { from { opacity: .2; } to { opacity: 1; } }
.tcap {
  position: absolute;
  inset: 0;
  display: block;
  background: #000;
  opacity: 0;
  transition: opacity .5s ease;
}
.box:hover .tcap, .tile:focus-visible .tcap { opacity: .8; }
.tcaptxt {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 20px;
  text-align: center;
}

html.contact-open, body.contact-open { overflow: hidden; }
.contact-open.keep-gutter { scrollbar-gutter: stable; }
#contact {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 16px;
  border: 0;
  color: #222;
  background: #fff;
  overflow: hidden;
  overscroll-behavior: none;
}
#contact[open], body:not(.enhanced) #contact:target { display: grid; place-items: center; }
#contact::backdrop { background: transparent; }
html:has(body:not(.enhanced) #contact:target) { overflow: hidden; }
body:not(.enhanced):has(#contact:target) { overflow: hidden; scrollbar-gutter: stable; }
.tclose { position: absolute; top: 25px; left: 22px; line-height: 0; }
.cabtxt { text-align: center; overflow-wrap: anywhere; font-size: 1rem; }

footer {
  height: 60px;
  margin: 40px 0 0 100px;
  color: #666;
  font: 400 1rem 'PT Sans Narrow', sans-serif;
}
footer a { color: #000; font-weight: 700; }
.contact-credits {
  position: absolute;
  inset: auto 16px 20px;
  height: auto;
  margin: 0;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

html.player-open { overflow: hidden; }
#player {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  padding: 0;
  margin: 0;
  border: 0;
  background: #000;
  color: #fff;
  overflow: hidden;
}
#player::backdrop { background: #000; }
#frame {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  user-select: none;
}
#frame .player-video {
  grid-area: 1 / 1;
  position: relative;
  top: -4px;
  width: 100%;
  max-width: 1100px;
  aspect-ratio: 16 / 9;
  cursor: auto;
}
.player-video iframe { display: block; width: 100%; height: 100%; border: 0; }
#player button {
  width: 70px;
  height: 80px;
  padding: 0;
  border: 0;
  background: transparent url('i/icons.svg') no-repeat;
  cursor: pointer;
}
#player button:focus-visible { outline-color: #fff; outline-offset: -6px; }
#player #player-close { position: absolute; top: 0; left: 0; z-index: 2; background-position: 22px 28px; }
#player-controls { position: absolute; inset: auto 0 0; height: 80px; background: #000; opacity: .95; }
.player-arrows { display: flex; justify-content: space-between; height: 80px; margin: 0 auto; }
#player #previous { background-position: -25px 13px; }
#player #next { background-position: -65px 13px; }
#player button:disabled { opacity: .3; cursor: default; }

@media (min-width: 800px) {
  #player #player-close { left: 10px; }
  .player-arrows { width: 92%; max-width: 800px; }
}
@media (min-device-width: 480px) and (orientation: landscape) {
  #frame .player-video { max-width: 130vh; }
}
@media (hover: none) and (pointer: coarse) { #player-controls { display: none; } }
@media (max-width: 970px) {
  #box-container .box { width: 48%; margin: 0 2% 1.5%; }
  #box-container .box:nth-child(odd) { clear: left; margin-left: 0; }
  #box-container .box:nth-child(even) { clear: none; margin-right: 0; }
}
@media (max-width: 600px) {
  #site-header { width: 70px; padding: 17px 14px 14px; }
  .tclose { top: 8px; left: 5px; }
  .container { margin-left: 70px; padding: 0; }
  #box-container .box:nth-child(n) { width: 100%; margin: 0; }
  footer { margin-left: 70px; }
}
@media (max-height: 500px) { .social { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  .tile.is-loaded, .tile.is-loaded img, .tile.is-loading.in-view::before { animation: none; }
  .tile.is-loading.in-view::before { opacity: .2; }
  .tcap, a > img { transition: none; }
}
