/* MENU: a quiet "index" menu. The four pages as large titles with Azeret Mono numbers and 2px rules, a small preview
   that changes with the page you point at, and one row of social links in the same style as the current menu.
   Loaded on every page after enhancements.css. */

.menu-overlay.mb {
  display: block;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background-color: var(--_colors-alo-creative---darkgrey);
  color: #f0efeb;
  --mb-line: rgba(240, 239, 235, 0.18);
  --mb-soft: rgba(240, 239, 235, 0.62);
  --mb-accent: var(--_colors-alo-creative---orange-500);
}
/* The hover colour (the numbers and the social links) is the same as the close button on that page: orange by default,
   red on Capella Records, blue on Projects (the close-button colours are set in custom.css). */
.capella-page .mb { --mb-accent: var(--_colors-alo-creative---red-500, #be3041); }
.portfolio-page .mb { --mb-accent: var(--_colors-alo-creative---blue-500, #7c8bb9); }
.mb a { color: inherit; text-decoration: none; }
.mb a:focus-visible { outline: 2px solid #f0efeb; outline-offset: 4px; border-radius: 6px; }

.mb-inner {
  position: relative; z-index: 1;
  min-height: 100%;
  display: flex; flex-direction: column; gap: 24px;
  padding: 118px 30px 30px; box-sizing: border-box;
}
.mb-main { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 30px; align-items: center; }

/* ---- the four pages ---- */
.mb-list { grid-column: 1 / span 7; display: flex; flex-direction: column; justify-content: center; min-height: 0; }
.mb-row { position: relative; transition: opacity 0.35s ease; }
.mb-line { display: block; height: 2px; background: var(--mb-line); }
.mb-link { display: flex; align-items: baseline; gap: clamp(14px, 2vw, 28px); padding-block: clamp(10px, 2.2vh, 26px); position: relative; }
.mb-num { font-family: "Azeret Mono", Arial, sans-serif; font-size: 13px; letter-spacing: 0.06em; color: var(--mb-soft); min-width: 2.4ch; transition: color 0.3s ease; }
.mb-title { display: block; overflow: hidden; padding-block: 0.08em 0.32em; margin-block: -0.08em -0.32em; font-size: clamp(40px, min(5.8vw, calc((80vh - 208px) / 4.08)), 92px); transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
.mb-title-in { display: block; font-family: Switzer, Arial, sans-serif; font-weight: 500; font-size: 1em; line-height: 1.02; letter-spacing: -0.03em; }
.mb-arrow { width: clamp(26px, 2.6vw, 40px); height: auto; margin-left: auto; align-self: center; opacity: 0; transform: translateX(-24px); transition: opacity 0.35s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
.mb-soon, .mb i {
  font-family: "Azeret Mono", Arial, sans-serif; font-style: normal; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid rgba(240, 239, 235, 0.7); border-radius: 100px; padding: 2px 9px 3px; line-height: 1.3; white-space: nowrap;
}
.mb-soon { align-self: center; margin-left: 4px; }
.mb-row-soon { opacity: 0.5; }
.mb-row-soon .mb-link { cursor: default; }

@media (hover: hover) {
  .mb-list:has(.mb-link:is(:hover, :focus-visible)) .mb-row:not(:has(.mb-link:is(:hover, :focus-visible))) { opacity: 0.28; }
  .mb-row:has(.mb-link:is(:hover, :focus-visible)) { opacity: 1; }
  .mb-link:is(:hover, :focus-visible) .mb-title { transform: translateX(16px); }
  .mb-link:is(:hover, :focus-visible) .mb-num { color: var(--mb-accent); }
  .mb-link:is(:hover, :focus-visible) .mb-arrow { opacity: 1; transform: translateX(0); }
}

/* ---- preview card ---- */
.mb-preview { grid-column: 10 / span 3; display: flex; flex-direction: column; justify-content: center; gap: 12px; min-height: 0; }
.mb-preview-card { position: relative; width: 100%; aspect-ratio: 4 / 5; max-height: 52vh; border-radius: 20px; overflow: hidden; background: #1a1a1d; }
.mb-preview-item { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity 0.55s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
.mb-preview-item.is-on { opacity: 1; transform: scale(1); }
.mb-preview-item[data-key="projects"] { object-position: 96% 50%; }   /* the Norway photo is wide: keep the poster in the frame */
.mb-preview-contact { display: flex; align-items: center; justify-content: center; padding: 28px; box-sizing: border-box; background: var(--_colors-alo-creative---grey); color: #0d0d0f; text-align: center; }
.mb-preview-contact p { margin: 0; font-size: clamp(26px, 2.5vw, 40px); line-height: 1.06; letter-spacing: -0.025em; font-weight: 500; text-wrap: balance; }
.mb-caption { margin: 0; display: flex; justify-content: space-between; font-family: "Azeret Mono", Arial, sans-serif; font-size: 12px; letter-spacing: 0.06em; color: var(--mb-soft); }

/* ---- follow: one quiet row, same style as the current menu ---- */
.mb-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; font-family: "Azeret Mono", Arial, sans-serif; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }
.mb-foot a { transition: color 0.25s ease; }
.mb-foot a:is(:hover, :focus-visible) { color: var(--mb-accent); }
.mb-dim { opacity: 0.5; display: inline-flex; gap: 8px; align-items: center; }

/* ---- tablet: no preview card ---- */
@media (max-width: 991px) {
  .mb-inner { padding-top: 104px; }
  .mb-main { display: block; }
  .mb-preview { display: none; }
  .mb-list { justify-content: flex-start; }
  .mb-title { font-size: clamp(44px, 9vw, 80px); }
  .mb-arrow { opacity: 1; transform: none; }
}
@media (max-width: 767px) {
  .mb-inner { padding: 92px 16px 24px; gap: 22px; }
  .mb-title { font-size: clamp(40px, 12vw, 60px); }
  .mb-link { padding-block: 11px; }
  .mb-arrow { width: 24px; }
  .mb-num { font-size: 12px; }
  .mb-foot { gap: 10px 22px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .mb-row, .mb-title, .mb-arrow, .mb-preview-item, .mb-num, .mb-foot a { transition: none; }
}
