/* ==========================================================================
   anarchistan — the image is the content; the chrome gets out of its way.
   Palette:  void #0a0a0b · bone #e8e4dc · blood #b3121a · ash #6b6a66
   Type:     system sans for the wordmark, monospace for the "exhibit" caption.
   ========================================================================== */

:root {
  --void:  #0a0a0b;
  --panel: #131315;
  --bone:  #e8e4dc;
  --blood: #b3121a;
  --ash:   #6b6a66;
  --edge:  #26262a;

  --gap: clamp(0.75rem, 2vw, 1.5rem);
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--void);
  color: var(--bone);
  font-family: var(--sans);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  /* faint vignette so the image reads as centered on a stage */
  background-image: radial-gradient(ellipse at center, #101013 0%, var(--void) 70%);
}

/* --- skip link -------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--bone);
  color: var(--void);
  padding: 0.5rem 0.75rem;
  z-index: 10;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* --- masthead --------------------------------------------------------------- */
.masthead {
  padding: var(--gap);
  border-bottom: 1px solid var(--edge);
}
.masthead__home {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--bone);
  text-decoration: none;
}
.masthead__home::before {
  content: "▪ ";
  color: var(--blood);
}

/* --- stage (the persistent swap region) ------------------------------------ */
.stage {
  flex: 1 1 auto;
  display: grid;
  place-items: center;
  padding: var(--gap);
}

/* --- slide ------------------------------------------------------------------ */
.slide {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  max-width: min(100%, 1100px);
  /* names the slide for the View Transition cross-fade */
  view-transition-name: slide;
}

.slide__link {
  display: block;
  line-height: 0;
  cursor: pointer;
  outline-offset: 4px;
}
.slide__link:focus-visible {
  outline: 2px solid var(--blood);
}

/* The final "start over" link gets a faint pulse so the loop-back reads as
   intentional rather than an accidental jump. Quiet by design. */
.slide__link--wrap .slide__img {
  animation: wrap-breathe 2.4s ease-in-out infinite;
}
@keyframes wrap-breathe {
  0%, 100% { border-color: var(--edge); }
  50%      { border-color: var(--blood); }
}
@media (prefers-reduced-motion: reduce) {
  .slide__link--wrap .slide__img { animation: none; }
}

.slide__img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  height: auto;
  width: auto;
  border: 1px solid var(--edge);
  background: var(--panel);
}

/* --- caption: framed like a catalogued exhibit ----------------------------- */
.slide__meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ash);
  display: flex;
  align-items: baseline;
  gap: 1rem;
  width: 100%;
  max-width: 100%;
  padding-top: 0.25rem;
  border-top: 1px solid var(--edge);
}
.slide__caption {
  color: var(--bone);
}
.slide__counter {
  margin-left: auto;
  color: var(--ash);
  font-variant-numeric: tabular-nums;
}

/* --- colophon --------------------------------------------------------------- */
.colophon {
  padding: var(--gap);
  border-top: 1px solid var(--edge);
  text-align: center;
}
.colophon p {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ash);
}

/* --- View Transition tuning ------------------------------------------------- */
::view-transition-old(slide),
::view-transition-new(slide) {
  animation-duration: 260ms;
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(slide),
  ::view-transition-new(slide) {
    animation: none;
  }
}
