/* Monumental Construction — Concierge scene & chat
 * Presentation per Dan's spec (Nov 10, 2026):
 * - NOT a square video box: the scene is a band inside the page flow and its
 *   edges fade/blend into the page background.
 * - The DOOR is part of the page and stays visible the whole time he talks
 *   (after opening it rests open against the wall, in view).
 * - Entrance: door starts closed, opens, he pokes around it and comes in.
 */

.mc-scene {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 8px;
  display: flex;
  gap: 28px;
  align-items: stretch;
  /* feathered edges — the scene blends into the page, no hard box outline */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 4%, #000 96%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 4%, #000 96%, transparent 100%);
  font-family: inherit;
}

/* ---------- The doorway (stays on the page) ---------- */
.mc-doorway {
  position: relative;
  flex: 0 0 300px;
  min-height: 380px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.mc-doorframe {
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 218px; height: 372px;
  border: 10px solid #6b4a2b;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #fdf6ec 0%, #f3e6cf 100%);
  box-shadow: inset 0 0 24px rgba(107,74,43,.25);
  overflow: visible;
}
/* The door panel itself — hinged on the left, swings open and STAYS open */
.mc-door {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(105deg, #8a5a33 0%, #a06a3a 55%, #7c4f2a 100%);
  border-radius: 2px;
  box-shadow: inset 0 0 0 6px rgba(0,0,0,.08), inset 24px 0 32px rgba(0,0,0,.18);
  transform-origin: left center;
  transform: perspective(900px) rotateY(0deg);
  transition: transform 1.5s ease-in-out;
  z-index: 3;
}
.mc-door::after { /* door knob */
  content: "";
  position: absolute; right: 14px; top: 50%;
  width: 13px; height: 13px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffe9a8, #c9a227 70%, #8a6d14);
}
.mc-door-opening .mc-door { transform: perspective(900px) rotateY(-72deg); }

/* Him — starts hidden behind the door, peeks, then steps in and stays */
.mc-mascot {
  position: absolute;
  bottom: 0; left: 50%;
  width: 205px;
  transform: translateX(-88%);
  opacity: 0;
  transition: transform 1.4s ease, opacity .5s ease;
  z-index: 2;
  pointer-events: none;
}
.mc-door-opening .mc-mascot { opacity: 1; transform: translateX(-64%) rotate(2deg); } /* the peek */
.mc-arrived .mc-mascot { transform: translateX(-50%); }                                /* steps in */
.mc-entrance-video {
  position: absolute;
  bottom: 0; left: 50%;
  width: 218px; height: 372px;
  object-fit: cover;
  transform: translateX(-50%);
  z-index: 4;
  border-radius: 2px;
  /* Hidden until actually playing (2026-11-14 fix): a non-playing video
   * must never mask the doorway with a frozen first frame. JS adds
   * .mc-video-live on the 'playing' event and removes it on
   * 'ended'/rejection. No layout/geometry change. */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.mc-entrance-video.mc-video-live {
  opacity: 1;
  visibility: visible;
}

/* ---------- Chat side ---------- */
.mc-chat {
  flex: 1 1 auto;
  display: flex; flex-direction: column;
  min-height: 380px;
}
.mc-chat-title { margin: 0 0 4px; font-size: 1.35rem; }
.mc-chat-sub { margin: 0 0 12px; opacity: .85; }
.mc-chat-log {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 6px 2px;
  display: flex; flex-direction: column; gap: 10px;
  max-height: 340px;
}
.mc-msg {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  font-size: .98rem;
}
.mc-msg-him { background: #fff7ea; border: 1px solid #e8d5ae; align-self: flex-start; border-bottom-left-radius: 4px; }
.mc-msg-you { background: #2f5d8a; color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }

/* The signature beat: clipboard + glasses while he checks */
.mc-checking {
  display: none;
  align-items: center; gap: 10px;
  padding: 6px 2px;
  font-style: italic; opacity: .9;
}
.mc-checking img {
  width: 40px; height: 40px; object-fit: cover; object-position: top;
  border-radius: 50%;
  /* head dips down toward the clipboard as he pulls his glasses down */
  animation: mc-look-down 1.1s ease-in-out infinite alternate;
}
@keyframes mc-look-down {
  from { transform: rotate(0deg) translateY(0); }
  to   { transform: rotate(7deg) translateY(3px); }
}
.mc-checking .mc-dots::after {
  content: "…";
  animation: mc-dots 1s steps(3) infinite;
}
@keyframes mc-dots { 0% { opacity: .2; } 100% { opacity: 1; } }

.mc-chat-row { display: flex; gap: 8px; margin-top: 10px; }
.mc-chat-row input {
  flex: 1 1 auto;
  padding: 11px 12px;
  border: 1px solid #c9b48a;
  border-radius: 10px;
  font-size: 1rem;
}
.mc-chat-row button {
  padding: 11px 20px;
  border: none; border-radius: 10px;
  background: #b3541e; color: #fff;
  font-size: 1rem; cursor: pointer;
}
.mc-chat-row button:hover { background: #96450f; }
.mc-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mc-quick button {
  border: 1px solid #c9b48a; background: #fffdf6; color: #5a3d16;
  border-radius: 999px; padding: 5px 12px; font-size: .86rem; cursor: pointer;
}

@media (max-width: 760px) {
  .mc-scene { flex-direction: column; }
  .mc-doorway { flex-basis: 340px; }
}
