/* World-intro cinematic. Self-contained, removable with intro.js. A full-screen
   takeover that reads as a scrolling page: a square (1:1) chapter image on top,
   the full chapter title + text flowing below (the PAGE scrolls -- no inner
   scroll box), and a fixed footer bar (Back / progress / Next / Skip) that stays
   visible the whole time. */

.manor-intro {
  position: fixed;
  inset: 0;
  z-index: 3000; /* above splash and every in-game surface */
  background: #07060a;
  color: #ecdfc8;
  font-family: 'IM Fell English', Georgia, serif;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* the .mi-scroll child scrolls; the footer stays put */
}

/* ── Scrolling content: square image, then the full text ─────────────────── */
.mi-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: clamp(1rem, 4vw, 2.5rem) 1rem 1.6rem;
  text-align: center;
}

.mi-art {
  display: block;
  width: min(90vw, 560px);
  aspect-ratio: 1 / 1; /* square; nudge here if the source ratio changes */
  object-fit: cover;
  margin: 0 auto clamp(1rem, 4vw, 1.8rem);
  border-radius: 4px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  background: #0c0a0f; /* placeholder tone before the image loads */
}

.mi-scroll.mi-in {
  animation: mi-fade 0.6s ease forwards;
}

@keyframes mi-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.mi-body {
  max-width: 44rem;
  margin: 0 auto;
}

.mi-title {
  margin: 0 0 0.6rem;
  text-align: center;
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: clamp(1.1rem, 4vw, 1.6rem);
  letter-spacing: 0.05em;
  color: #e7c98c;
}

.mi-text {
  white-space: pre-line; /* honor \n in the catalog text as line breaks */
  text-align: left;
  font-size: clamp(1rem, 2.6vw, 1.15rem);
  line-height: 1.65;
}

/* ── Fixed footer: always-visible navigation + skip ─────────────────────── */
.mi-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem clamp(0.8rem, 3vw, 1.4rem);
  background: #0b090e;
  border-top: 1px solid rgba(184, 148, 90, 0.4);
}

.mi-nav {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.mi-progress {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: #b8945a;
  min-width: 3.5rem;
  text-align: center;
}

.mi-back,
.mi-next,
.mi-skip,
.mi-mute {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.5rem 1.1rem;
  cursor: pointer;
  color: #e7c98c;
  background: rgba(8, 4, 0, 0.72);
  border: 1px solid var(--gold, #b8945a);
  border-radius: 4px;
  transition: color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.mi-back:hover,
.mi-next:hover,
.mi-skip:hover,
.mi-mute:hover {
  color: #f0d878;
  border-color: #f0d878;
}

/* Back/Next are compact chevron buttons: bigger glyph, square-ish, no tracking. */
.mi-back,
.mi-next {
  font-size: 1.25rem;
  line-height: 1;
  letter-spacing: 0;
  padding: 0.3rem 0.7rem;
}

/* Muted state reads dimmer so it is obvious at a glance. */
.mi-mute[aria-pressed='true'] {
  border-color: #5a4a36;
  color: #8c7a5e;
}

.mi-back:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.mi-skip {
  border-color: #5a4a36;
  color: #b8a888;
}

@media (prefers-reduced-motion: reduce) {
  .mi-scroll.mi-in {
    animation: none;
    opacity: 1;
  }
}
