/* =========================================================================
   Immersive Met visit — full-screen, room-by-room walkthrough.
   Uses the shared design tokens from styles.css.
   ========================================================================= */
body.mv { overflow: hidden; height: 100svh; }
.mv [hidden] { display: none !important; }

/* ---- Top bar ---- */
.mv-top {
  position: fixed; top: 0; left: 0; width: 100%; height: 58px; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0 clamp(1rem, 3vw, 2.4rem);
  background: linear-gradient(180deg, rgba(8,11,20,0.85), rgba(8,11,20,0));
}
.mv-exit { display: inline-flex; align-items: center; gap: 0.5em; font-family: var(--font-ui); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.mv-exit svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.mv-exit:hover { color: var(--oro); }
.mv-roomlabel {
  font-family: var(--font-ui); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--oro); display: inline-flex; align-items: center; gap: 0.6em; max-width: 60vw; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.mv-roomlabel::after { content: '▾'; font-size: 0.8em; opacity: 0.7; }
.mv-tools { display: flex; align-items: center; gap: 0.8rem; }

.mv-progress { position: fixed; top: 58px; left: 0; width: 100%; height: 2px; background: var(--hair-soft); z-index: 60; }
.mv-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--oro-deep), var(--oro-bright)); transition: width 0.6s var(--ease); }

/* ---- Cover ---- */
.mv-cover { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; overflow: hidden; background: var(--notte); transition: opacity 0.8s var(--ease), visibility 0.8s; }
.mv-cover.gone { opacity: 0; visibility: hidden; }
.mv-cover__bg { position: absolute; inset: -4%; background-size: cover; background-position: center; filter: blur(14px) saturate(0.9) brightness(0.5); opacity: 0.5; transform: scale(1.08); transition: background-image 1s; }
.mv-cover__veil { position: absolute; inset: 0; background: radial-gradient(120% 100% at 50% 35%, rgba(11,14,24,0.4), rgba(11,14,24,0.92)); }
.mv-cover__inner { position: relative; text-align: center; padding: 2rem clamp(1.2rem, 5vw, 3rem); max-width: 900px; }
.mv-cover__title { font-family: var(--font-display); font-weight: 600; color: var(--ink); line-height: 1.02; font-size: clamp(2.8rem, 8vw, 6.5rem); margin: 1.2rem 0 0.6rem; }
.mv-cover__title span { color: var(--oro-bright); font-style: italic; font-weight: 500; }
.mv-cover__meta { font-family: var(--font-ui); font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-mute); }
.mv-cover__lede { margin: 1.6rem auto 0; max-width: 56ch; font-size: var(--fs-lead); color: var(--ink-soft); }
.mv-cover__cta { display: flex; gap: 0.9rem; justify-content: center; margin-top: 2.2rem; flex-wrap: wrap; }
.mv-cover__lang { margin-top: 2rem; }

/* ---- Stage ---- */
.mv-stage { position: fixed; inset: 58px 0 0; z-index: 20; display: grid; grid-template-columns: 1.5fr 1fr; }
.mv-figure { position: relative; display: grid; place-items: center; overflow: hidden; padding: clamp(1.5rem, 4vw, 4rem); background: radial-gradient(130% 130% at 50% 35%, #11162e, #090c16 80%); }
.mv-img { max-width: 100%; max-height: calc(100svh - 58px - clamp(3rem, 8vw, 8rem)); object-fit: contain; box-shadow: 0 40px 110px rgba(0,0,0,0.6); border: 1px solid var(--hair); opacity: 0; transform: scale(0.985); transition: opacity 0.7s var(--ease), transform 1.4s var(--ease); }
.mv-img.loaded { opacity: 1; transform: scale(1); }
.mv-figure__cap { position: absolute; left: 50%; bottom: 1rem; transform: translateX(-50%); font-family: var(--font-ui); font-size: 0.64rem; letter-spacing: 0.1em; color: var(--ink-mute); text-align: center; max-width: 80%; }

.mv-panel { background: var(--notte-2); border-left: 1px solid var(--hair-soft); overflow: hidden; min-height: 0; }
.mv-panel__scroll { height: 100%; overflow-y: auto; padding: clamp(1.8rem, 3vw, 3rem) clamp(1.5rem, 2.4vw, 2.6rem); display: flex; flex-direction: column; }
.mv-counter { font-family: var(--font-ui); font-size: 0.72rem; letter-spacing: 0.2em; color: var(--oro); }
.mv-badge { align-self: flex-start; margin-top: 0.8rem; font-family: var(--font-ui); font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sanguigna-bright); border: 1px solid rgba(182,89,60,0.45); border-radius: 100px; padding: 0.4em 0.9em; }
.mv-title { font-family: var(--font-display); font-weight: 600; color: var(--ink); line-height: 1.08; font-size: clamp(1.5rem, 2.4vw, 2.3rem); margin: 0.7rem 0 0.3rem; }
.mv-artist { font-family: var(--font-ui); font-size: 0.86rem; color: var(--paper-mute); }
.mv-panel .lb-section:first-of-type { margin-top: 1.4rem; }

/* ---- Arrows ---- */
.mv-arrow { position: fixed; top: calc(50% + 29px); transform: translateY(-50%); width: 54px; height: 54px; border: 1px solid var(--hair); border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: rgba(8,11,20,0.55); backdrop-filter: blur(4px); z-index: 40; transition: background 0.4s, color 0.4s, opacity 0.4s; }
.mv-arrow:hover { background: var(--oro); color: var(--notte); }
.mv-arrow svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.mv-arrow.prev { left: clamp(0.6rem, 2vw, 1.8rem); }
.mv-arrow.next { left: calc(60% - 27px); }   /* sits near the seam between image and panel */

/* ---- Room card ---- */
.mv-roomcard { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: var(--notte); opacity: 0; visibility: hidden; transition: opacity 0.7s var(--ease), visibility 0.7s; }
.mv-roomcard.show { opacity: 1; visibility: visible; }
.mv-roomcard__inner { text-align: center; padding: 2rem; max-width: 760px; transform: translateY(18px); transition: transform 0.9s var(--ease); }
.mv-roomcard.show .mv-roomcard__inner { transform: none; }
.mv-roomcard__num { display: block; font-size: clamp(3.5rem, 10vw, 7rem); line-height: 1; }
.mv-roomcard__eyebrow { font-family: var(--font-ui); font-size: 0.74rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink-mute); margin-top: 1.2rem; }
.mv-roomcard__title { font-family: var(--font-display); font-weight: 600; color: var(--ink); font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.05; margin-top: 0.5rem; }
.mv-roomcard__blurb { margin: 1.3rem auto 0; max-width: 52ch; font-size: var(--fs-lead); color: var(--ink-soft); }

/* ---- Room menu ---- */
.mv-menu { position: fixed; inset: 0; z-index: 90; background: var(--notte-2); clip-path: inset(0 0 100% 0); transition: clip-path 0.6s var(--ease); pointer-events: none; overflow-y: auto; }
.mv-menu.open { clip-path: inset(0 0 0 0); pointer-events: auto; }
.mv-menu__close { position: fixed; top: 1.2rem; right: 1.4rem; width: 46px; height: 46px; border: 1px solid var(--hair); border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: rgba(8,11,20,0.5); }
.mv-menu__close:hover { background: var(--oro); color: var(--notte); }
.mv-menu__close svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.mv-menu__inner { max-width: 900px; margin: 0 auto; padding: clamp(4rem, 10vh, 7rem) var(--gutter) 4rem; display: flex; flex-direction: column; gap: 0.4rem; }
.mv-room { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 1.2rem; padding: 1.1rem 0; border-bottom: 1px solid var(--hair-soft); text-align: left; }
.mv-room:hover .mv-room__title { color: var(--oro); }
.mv-room__num { font-family: var(--font-roman); color: var(--oro); font-size: 1.4rem; }
.mv-room__title { font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 2.1rem); font-weight: 600; color: var(--ink); transition: color 0.3s; }
.mv-room__count { font-family: var(--font-ui); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--ink-mute); }

/* ---- End ---- */
.mv-end { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: var(--notte); }
.mv-end__inner { text-align: center; padding: 2rem clamp(1.2rem, 5vw, 3rem); max-width: 760px; }
.mv-end__title { font-family: var(--font-display); font-weight: 600; color: var(--ink); font-size: clamp(2.2rem, 6vw, 4.2rem); line-height: 1.04; margin: 1rem 0 0.6rem; }
.mv-end__text { margin: 0 auto; max-width: 52ch; font-size: var(--fs-lead); color: var(--ink-soft); }

/* ---- Overview grid ---- */
.mv-overview {
  position: fixed; inset: 58px 0 0; z-index: 30; overflow-y: auto;
  background: var(--notte); padding: clamp(1.5rem, 3vw, 3rem) clamp(1rem, 3vw, 2.6rem) 5rem;
}
.mv-overview__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem;
  margin-bottom: clamp(2rem, 4vw, 3.5rem); flex-wrap: wrap;
}
.mv-overview__title {
  font-family: var(--font-display); font-weight: 600; color: var(--ink); line-height: 1.05;
  font-size: clamp(1.8rem, 4vw, 3rem); margin-top: 0.4rem;
}
.mv-overview__grid { columns: 4 200px; column-gap: clamp(0.8rem, 1.5vw, 1.4rem); }
@media (max-width: 600px) {
  .mv-overview__grid { columns: 3 110px; column-gap: 0.6rem; }
  .ovcard__meta { padding: 0.5rem 0.6rem 0.6rem; }
  .ovcard__title { font-size: 0.72rem; }
  .ovcard__artist { font-size: 0.58rem; }
}
.ovcard {
  display: block; width: 100%; text-align: left; background: var(--notte-2); border: 1px solid var(--hair-soft);
  border-radius: 8px; overflow: hidden; margin-bottom: clamp(0.8rem, 1.5vw, 1.4rem);
  cursor: pointer; transition: border-color 0.3s, transform 0.3s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.ovcard:hover { border-color: var(--oro); transform: translateY(-2px); }
.ovcard:focus-visible { outline: 2px solid var(--oro-bright); outline-offset: 2px; }
.ovcard__img { width: 100%; display: block; aspect-ratio: 3/4; object-fit: cover; background: #0d1020; }
.ovcard__meta { padding: 0.7rem 0.9rem 0.85rem; }
.ovcard__title { font-family: var(--font-serif); font-weight: 500; font-size: 0.88rem; color: var(--ink); line-height: 1.18; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ovcard__artist { font-family: var(--font-ui); font-size: 0.66rem; color: var(--ink-mute); margin-top: 0.3em; letter-spacing: 0.04em; }
.ovcard__chip { display: inline-block; margin-top: 0.5em; font-family: var(--font-ui); font-size: 0.58rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--oro-deep); border: 1px solid rgba(198,162,90,0.25); border-radius: 100px; padding: 0.25em 0.6em; white-space: nowrap; }

/* Room divider card — flows in the masonry grid */
.ovdivider {
  display: block; width: 100%; text-align: center;
  padding: 1rem 0.6rem 0.8rem; margin-bottom: clamp(0.8rem, 1.5vw, 1.4rem);
  border-bottom: 1px solid var(--oro); border-top: 1px solid var(--hair-soft);
  break-inside: avoid;
}
.ovdivider__num { display: block; font-size: clamp(2rem, 4vw, 3rem); line-height: 1; color: var(--oro); }
.ovdivider__title { display: block; font-family: var(--font-display); font-weight: 600; font-size: clamp(0.95rem, 1.5vw, 1.25rem); color: var(--ink); margin-top: 0.3rem; }
.ovdivider__count { display: block; font-family: var(--font-ui); font-size: 0.64rem; letter-spacing: 0.1em; color: var(--ink-mute); margin-top: 0.25rem; }

/* ---- Overview tool btn ---- */
.mv-tool-btn {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid transparent; background: none; color: var(--ink-soft); transition: color 0.3s, border-color 0.3s;
}
.mv-tool-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.mv-tool-btn:hover { color: var(--ink); border-color: var(--hair); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .mv-stage {
    display: flex; flex-direction: column;
    overflow-y: auto; overflow-x: hidden;
  }
  .mv-figure {
    flex: 0 0 auto;
    height: 72svh; min-height: 72svh;
    padding: 1rem;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    transition: height 0.4s var(--ease), min-height 0.4s var(--ease), padding 0.4s var(--ease);
    position: sticky; top: 0; z-index: 22;
    cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .mv-figure::after {
    content: ''; position: absolute; bottom: 0.5rem; left: 50%;
    width: 28px; height: 28px; transform: translateX(-50%);
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%23c8a24a' stroke-width='1.5' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat;
    opacity: 0.6; transition: opacity 0.3s;
    pointer-events: none;
  }
  .mv-figure--compact::after { opacity: 0; }
  .mv-figure--compact { cursor: pointer; }
  .mv-figure--compact {
    height: 100px; min-height: 100px;
    padding: 0.5rem 1rem;
    flex-direction: row;
    justify-content: flex-start; gap: 0.8rem;
  }
  .mv-figure--compact .mv-img {
    max-height: 78px; max-width: 58px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5); border: 1px solid var(--hair-soft);
    margin: 0;
  }
  .mv-figure--compact .mv-figure__cap {
    position: static; transform: none;
    text-align: left; max-width: 65%;
    font-size: 0.68rem; color: var(--ink-soft);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .mv-img {
    max-height: calc(72svh - 2rem);
    transition: max-height 0.4s var(--ease), max-width 0.4s var(--ease);
  }
  .mv-panel {
    border-left: none; border-top: 1px solid var(--hair-soft);
    flex: 1 0 auto; min-height: 50svh;
  }
  .mv-panel__scroll { overflow: visible; height: auto; }
  .mv-arrow { top: auto; bottom: 2rem; width: 46px; height: 46px; z-index: 30; }
  .mv-arrow.prev { left: 0.8rem; }
  .mv-arrow.next { left: auto; right: 0.8rem; }
}
@media (max-width: 520px) {
  .mv-arrow { bottom: calc(48svh - 23px); width: 42px; height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  .mv-img, .mv-cover, .mv-roomcard, .mv-roomcard__inner, .mv-menu, .mv-progress i { transition: none !important; }
  .mv-img { transform: none; }
}
