/* intro.css — arcade-style intro cut scene + tutorial coach marks */

/* ---------- Cut scene overlay ---------- */
#intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Press Start 2P', monospace;
  color: #fff;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

/* 4:3 "CRT" stage, letterboxed inside whatever screen we're on */
#intro-stage {
  position: relative;
  width: min(100vw, 133.33vh);
  height: min(75vw, 100vh);
  max-width: 960px;
  max-height: 720px;
  background: #000;
  overflow: hidden;
}

/* Dialogue box (bottom) — classic blue window with white border */
#intro-dialog {
  position: absolute;
  left: 6%; right: 6%; top: 50%;
  transform: translateY(-50%);
  min-height: 30%;
  background: #000;
  border: 4px solid #fff;
  box-shadow: 0 0 0 4px #000;
  padding: 3.2% 3.5%;
  font-size: clamp(11px, 2.6vmin, 20px);
  line-height: 1.8;
  z-index: 10;
}
#intro-speaker {
  position: absolute;
  top: -1.4em;
  left: 3%;
  background: #fff;
  color: #000;
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px #000;
  padding: .35em .7em;
  font-size: .85em;
  letter-spacing: 1px;
}
#intro-speaker:empty { display: none; }
#intro-text.narration { color: #bbb; font-style: italic; }

/* Scene slug (replaces artwork) */
#intro-place {
  position: absolute;
  left: 6%; right: 6%;
  top: 17%;
  text-align: center;
  color: #888;
  font-size: clamp(9px, 1.9vmin, 14px);
  letter-spacing: 2px;
}
#intro-next {
  position: absolute;
  right: 3%;
  bottom: 8%;
  color: #fff;
  animation: intro-blink .7s steps(1) infinite;
}

/* Top-right controls */
.intro-ctrl {
  position: absolute;
  top: 2.5%;
  z-index: 30;
  font-family: inherit;
  font-size: clamp(8px, 1.6vmin, 13px);
  color: #fff;
  background: rgba(0,0,0,.55);
  border: 2px solid #fff;
  padding: .6em .9em;
  cursor: pointer;
}
#intro-skip { right: 2.5%; }
#intro-mute { right: calc(2.5% + 9em); }

/* Fade-to-black between scenes */
#intro-fader {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  z-index: 15;
  transition: opacity .35s steps(5);
}
#intro-fader.on { opacity: 1; }

/* Attract / title screens */
.intro-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 5%;
  z-index: 12;
}
.intro-screen .blink { animation: intro-blink 1s steps(1) infinite; }
.intro-title {
  font-size: clamp(22px, 7.5vmin, 64px);
  line-height: 1.25;
  color: #fff;
}
.intro-sub { font-size: clamp(9px, 2vmin, 16px); color: #bbb; }
.intro-small { font-size: clamp(8px, 1.6vmin, 13px); color: #aaa; }
.intro-press { font-size: clamp(10px, 2.6vmin, 20px); }
.intro-menu { display: flex; flex-direction: column; gap: 1.2em; }
.intro-menu button {
  font-family: inherit;
  font-size: clamp(10px, 2.2vmin, 18px);
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  padding: .3em .5em;
}
.intro-menu button::before { content: "  "; white-space: pre; }
.intro-menu button:hover::before,
.intro-menu button:focus::before { content: "▶ "; color: #fff; }
.intro-menu button:focus { outline: none; }

@keyframes intro-blink { 50% { opacity: 0; } }

/* ---------- Tutorial coach marks ---------- */
#tut-shield {
  position: fixed;
  inset: 0;
  z-index: 4000;
  background: transparent;
}
#tut-spot {
  position: fixed;
  z-index: 4001;
  border: 4px solid #fff;
  outline: 3px solid #000;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.72);
  pointer-events: none;
  transition: all .25s steps(5);
}
#tut-box {
  position: fixed;
  z-index: 4002;
  left: 50%;
  transform: translateX(-50%);
  width: min(92vw, 560px);
  background: #000;
  color: #fff;
  border: 4px solid #fff;
  box-shadow: 0 0 0 4px #000;
  padding: 18px 16px 14px;
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  line-height: 1.8;
}
#tut-box .tut-who {
  position: absolute;
  top: -14px; left: 12px;
  background: #fff;
  color: #000;
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px #000;
  padding: 3px 8px;
  font-size: 9px;
}
#tut-box .tut-step { color: #999; font-size: 9px; margin-bottom: 6px; }
#tut-box .tut-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
}
#tut-box button {
  font-family: inherit;
  font-size: 9px;
  padding: 8px 10px;
  color: #fff;
  background: #000;
  border: 2px solid #fff;
  cursor: pointer;
}
#tut-box button.primary { background: #fff; color: #000; }

.replay-intro {
  display: block;
  margin: 18px auto 30px;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  background: none;
  border: none;
  color: #666;
  text-decoration: underline;
  cursor: pointer;
}
