@charset "UTF-8";

:root {
  --bg: #242424;
  --text-muted: #999999;
  --text-dim: #777777;
  --text-white: #ffffff;
  --font: Verdana, Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 20px 16px 40px;
  background-color: var(--bg);
  background-image: url(background.gif);
  font-family: var(--font);
  color: var(--text-muted);
}

a { color: var(--text-dim); text-decoration: none; }
a:hover { color: var(--text-white); }

header {
  text-align: center;
  padding: 20px 0;
}

h1 {
  margin: 0;
  font-weight: normal;
  font-size: clamp(24px, 5vw, 36px);
  line-height: 1.25;
  color: var(--text-muted);
}

.subheading {
  margin: 8px 0 0;
  font-size: clamp(14px, 3vw, 20px);
  color: var(--text-muted);
}

main {
  max-width: 1200px;
  margin: 20px auto 0;
}

/* Slideshow */
.slideshow {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #000 url(loading.gif) center center no-repeat;
  border: 1px solid rgb(100, 100, 100);
}

.slideshow img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.15);
  /* --fade-seconds and --pan-seconds are set from slideshow.js so timing lives
     in one place. The fallbacks keep the effect working if the JS hasn't run. */
  transition: opacity var(--fade-seconds, 1.5s) ease-in-out;
}

.slideshow img.active {
  opacity: 1;
  z-index: 1;
  animation-duration: var(--pan-seconds, 6.5s);
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

/* Ken Burns: slow pan + zoom, corner-to-corner, alternating directions
   (mirrors the original crossSlide from/to pattern). */
.slideshow img.kb1.active { animation-name: kb1; } /* top-right → bottom-left */
.slideshow img.kb2.active { animation-name: kb2; } /* top-left → bottom-right */
.slideshow img.kb3.active { animation-name: kb3; } /* bottom-right → top-left */
.slideshow img.kb4.active { animation-name: kb4; } /* bottom-left → top-right */

@keyframes kb1 {
  from { transform: scale(1.25) translate(4%, -4%); }
  to   { transform: scale(1.15) translate(-4%, 4%); }
}
@keyframes kb2 {
  from { transform: scale(1.25) translate(-4%, -4%); }
  to   { transform: scale(1.15) translate(4%, 4%); }
}
@keyframes kb3 {
  from { transform: scale(1.15) translate(4%, 4%); }
  to   { transform: scale(1.25) translate(-4%, -4%); }
}
@keyframes kb4 {
  from { transform: scale(1.15) translate(-4%, 4%); }
  to   { transform: scale(1.25) translate(4%, -4%); }
}

footer {
  max-width: 1200px;
  margin: 16px auto 0;
  text-align: center;
}

.copyright {
  font-size: 11px;
  line-height: 1.3;
  color: var(--text-dim);
  margin: 12px 0 0;
}

.restart {
  font-size: clamp(12px, 2.5vw, 18px);
  line-height: 1.3;
  margin: 16px 0 0;
}

.link-button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--text-dim);
  text-decoration: underline;
  cursor: pointer;
}

.link-button:hover {
  color: var(--text-white);
}

audio {
  margin-top: 12px;
  width: 100%;
  max-width: 320px;
}

@media (max-width: 480px) {
  body { padding: 12px 10px 30px; }
  .slideshow { aspect-ratio: 3 / 4; }
}
