/* --- Reset & base --------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: Garamond, "EB Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  background: #0b0b0d;
  color: #e8e4d8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden; /* slideshow mode is full-viewport */
}
body.view-grid { overflow: auto; }

img { display: block; max-width: 100%; }
button {
  font: inherit; color: inherit; background: none; border: 0;
  cursor: pointer; padding: 0;
}

/* --- Top bar -------------------------------------------------------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px;
  background: linear-gradient(to bottom, rgba(0,0,0,.75), rgba(0,0,0,0));
  pointer-events: none; /* let clicks fall through except on children */
}
.topbar > * { pointer-events: auto; }
.brand {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #f4f0e2;
}
.view-toggle {
  display: inline-flex;
  background: rgba(20, 20, 22, .72);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.vt-btn {
  padding: 7px 18px;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #bcb6a4;
  transition: color .2s, background .2s;
}
.vt-btn:hover { color: #fff; }
.vt-btn.is-active {
  color: #0b0b0d;
  background: #e8e4d8;
}

/* --- Slideshow ------------------------------------------------------- */
.slideshow {
  position: relative;
  height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto auto;
  padding-top: 56px;
  padding-bottom: 0;
  overflow: hidden;
}
body.view-grid .slideshow { display: none; }

.stage {
  margin: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 0;
}
.image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 10px 90px 10px;
}
#stage-img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow:
    0 18px 60px rgba(0,0,0,.55),
    0 2px 0 rgba(255,255,255,.03) inset;
  border-radius: 2px;
  transition: opacity .35s ease;
}
#stage-img.is-loading { opacity: 0; }

.stage-caption {
  text-align: center;
  padding: 14px 24px 10px;
}
.stage-caption h2 {
  margin: 0 0 4px;
  font-size: clamp(20px, 2.1vw, 30px);
  font-weight: 500;
  letter-spacing: .02em;
  color: #f4f0e2;
}
.stage-caption p {
  margin: 0;
  font-size: clamp(13px, 1.15vw, 16px);
  color: #a8a294;
  font-style: italic;
}
.counter {
  margin-top: 6px !important;
  font-size: 12px !important;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #6a6558 !important;
  font-style: normal !important;
}

/* --- Navigation arrows ---------------------------------------------- */
.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px; height: 54px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  color: #e8e4d8;
  background: rgba(20, 20, 22, .55);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background .2s, transform .15s;
  z-index: 10;
}
.nav-arrow:hover { background: rgba(40,40,44,.85); }
.nav-arrow:active { transform: translateY(-50%) scale(.94); }
.nav-prev { left: 18px; }
.nav-next { right: 18px; }

/* --- Thumbnail strip ------------------------------------------------- */
.thumb-strip {
  display: flex;
  gap: 8px;
  padding: 10px 20px 14px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: #2a2a2e transparent;
  background: linear-gradient(to top, rgba(0,0,0,.6), rgba(0,0,0,0));
}
.thumb-strip::-webkit-scrollbar { height: 6px; }
.thumb-strip::-webkit-scrollbar-track { background: transparent; }
.thumb-strip::-webkit-scrollbar-thumb { background: #2a2a2e; border-radius: 3px; }

.thumb {
  flex: 0 0 auto;
  width: 72px; height: 72px;
  border-radius: 3px;
  overflow: hidden;
  background: #18181c;
  border: 2px solid transparent;
  opacity: .55;
  transition: opacity .2s, border-color .2s, transform .15s;
  position: relative;
}
.thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.thumb:hover { opacity: 1; transform: translateY(-2px); }
.thumb.is-active {
  opacity: 1;
  border-color: #e8e4d8;
}

/* --- Grid view ------------------------------------------------------- */
.grid {
  display: none;
  min-height: 100vh;
  padding: 84px 28px 48px;
}
body.view-grid .grid { display: block; }

.grid-inner {
  max-width: 1600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.card {
  background: #141417;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .25s ease, border-color .25s, box-shadow .25s;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,.18);
  box-shadow: 0 14px 40px rgba(0,0,0,.5);
}
.card-img {
  background: #0a0a0c;
  aspect-ratio: 3 / 4;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.card:hover .card-img img { transform: scale(1.03); }
.card-body {
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.card-title {
  margin: 0 0 3px;
  font-size: 16px;
  color: #f4f0e2;
  font-weight: 500;
}
.card-sub {
  margin: 0;
  font-size: 12.5px;
  color: #8d8878;
  font-style: italic;
}

/* --- Footer note ----------------------------------------------------- */
.footnote {
  position: fixed;
  left: 0; right: 0; bottom: 6px;
  text-align: center;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #4a4638;
  pointer-events: none;
  z-index: 5;
}
body.view-grid .footnote { position: static; padding: 20px 0 28px; }

/* --- Responsive tuning ---------------------------------------------- */
@media (max-width: 720px) {
  .image-wrap { padding: 6px 12px; }
  .nav-arrow {
    width: 44px; height: 44px; font-size: 20px;
  }
  .nav-prev { left: 8px; }
  .nav-next { right: 8px; }
  .topbar { padding: 10px 14px; }
  .brand { font-size: 16px; letter-spacing: .1em; }
  .vt-btn { padding: 6px 12px; font-size: 11px; }
  .thumb { width: 56px; height: 56px; }
  .thumb-strip { padding: 8px 12px 10px; }
  .grid { padding: 72px 14px 28px; }
  .grid-inner { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
  .footnote { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
