/* ── Home page ───────────────────────────────────────────────── */

html, body {
  overflow: hidden;
  height: 100%;
}

.home-stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-white);
}

/* ── Spinning container ──────────────────────────────────────── */
/*
  The entire block — text and image — spins continuously.
  One full 360° revolution every 60 seconds.
*/
.home-exhibition {
  position: relative;
  /* Stack text + image in the same space */
  display: grid;
  place-items: center;
  cursor: default;
  animation: home-spin 3600s linear infinite;
}

@keyframes home-spin {
  from { transform: rotate(0deg);   }
  to   { transform: rotate(360deg); }
}

@keyframes home-spin-ccw {
  from { transform: rotate(0deg);    }
  to   { transform: rotate(-360deg); }
}

/* Past exhibition spins counter-clockwise */
.home-exhibition.is-past {
  animation-name: home-spin-ccw;
}

/* Pause on hover so the user can read/click */
.home-exhibition:hover {
  animation-play-state: paused;
}

/* ── Text state (default, shows through the spin) ────────────── */
.home-text {
  grid-area: 1 / 1;          /* same cell as image → stacked */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.2em;
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.3;
  transition: opacity 0.35s ease;
  white-space: nowrap;       /* keep each line on one line */
}

.home-status {
  display: block;
  margin-block-end: 2em;
}

.home-title {
  display: block;
  text-decoration: underline;
  color: inherit;
}

.home-title:hover {
  text-decoration: underline;
}

.home-dates {
  display: block;
  margin-block-end: 2em;
}

.home-artists {
  list-style: none;
  padding: 0;
  margin: 0;
  margin-top: 0.5em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.home-artists li {
  padding: 0;
}

/* ── Image state (shows on hover, hidden otherwise) ──────────── */
.home-image-wrap {
  grid-area: 1 / 1;          /* same cell → overlaps text */
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-image-wrap a {
  display: flex;
  line-height: 0;
  cursor: pointer;
}

.home-key-image {
  display: block;
  max-width: 38vw;
  /* max-height: 100vh; */
  width: auto;
  height: 100vh; 
  object-fit: cover;
}


/* On hover: reveal image, hide text */
.home-exhibition:hover .home-image-wrap {
  opacity: 1;
  pointer-events: auto;
}

.home-exhibition:hover .home-text {
  opacity: 0;
}

/* ── Fade transition during exhibition cycling ───────────────── */
.home-exhibition.fading .home-text,
.home-exhibition.fading .home-image-wrap {
  opacity: 0 !important;
  transition: opacity 0.25s ease;
}

/* ── Empty state ─────────────────────────────────────────────── */
.home-empty {
  font-family: var(--font-serif);
  font-size: 16px;
}

/* ── Reduced motion: respect OS preference ───────────────────── */
@media (prefers-reduced-motion: reduce) {
  .home-exhibition {
    animation: none;
  }
  .home-text,
  .home-image-wrap {
    transition: none;
  }
}



@media screen and (max-width: 50rem) {

.home-key-image {
  max-width: 80vw;
  height: auto;

}
}