/* THE MINDS chapter overlay (#ov-minds). Everything is scoped under #ov-minds and prefixed mn-. */
#ov-minds { --teal: #5eead4; --acc: #5eead4; --ice: #8fc8ff; --vio: #a78bfa; }
#ov-minds .mn-panel, #ov-minds .mn-intro, #ov-minds .mn-term, #ov-minds .mn-co, #ov-minds .mn-cl, #ov-minds .mn-brk, #ov-minds .mn-ghost, #ov-minds .mn-tabs { pointer-events: none; }
#ov-minds li { pointer-events: none; }

/* ghost numeral behind the HUD */
#ov-minds .mn-ghost { position: absolute; left: calc(var(--gut) - 1.2vw); top: 50%; transform: translateY(-62%); font: 700 clamp(220px, 30vw, 460px)/1 var(--display); letter-spacing: -.05em;
  color: transparent; -webkit-text-stroke: 1px rgba(94, 234, 212, .13); opacity: 0; user-select: none; }
#ov-minds .mn-ghost.br { -webkit-text-stroke-color: rgba(232, 195, 122, .12); }

/* character-select tabs */
#ov-minds .mn-tabs { position: absolute; right: 28px; top: 76px; display: flex; gap: 6px; opacity: 0; }
#ov-minds .mn-tabs span { display: flex; flex-direction: column; gap: 6px; padding: 8px 12px 9px; min-width: 104px; color: var(--dim); border: 1px solid rgba(58, 55, 48, .7); background: rgba(5, 5, 6, .45);
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 0 100%); transition: color .3s, border-color .3s; font-size: 10px; }
#ov-minds .mn-tabs b { font-weight: 500; color: var(--faint); transition: color .3s; }
#ov-minds .mn-tabs span.on { color: var(--ink); border-color: rgba(94, 234, 212, .55); }
#ov-minds .mn-tabs span.on b { color: var(--teal); }
#ov-minds .mn-tabs i { display: block; height: 1px; background: var(--faint); position: relative; overflow: hidden; }
#ov-minds .mn-tabs u { position: absolute; inset: 0; background: var(--teal); transform-origin: left; transform: scaleX(0); box-shadow: 0 0 6px var(--teal); }

/* intro lineup, lower third (the page slate owns the centre) */
#ov-minds .mn-intro { position: absolute; left: var(--gut); right: var(--gut); bottom: 13vh; display: flex; flex-direction: column; gap: 20px; opacity: 0; }
#ov-minds .mn-intro ul { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(232, 195, 122, .35); }
#ov-minds .mn-intro li { display: flex; flex-direction: column; gap: 6px; padding: 16px 20px 0 0; }
#ov-minds .mn-intro li + li { padding-left: 20px; border-left: 1px solid var(--faint); }
#ov-minds .mn-intro li .mono { color: var(--teal); }
#ov-minds .mn-intro li b { font: 700 clamp(28px, 3.4vw, 52px)/.95 var(--display); letter-spacing: -.02em; }
#ov-minds .mn-intro li em { font: italic 400 clamp(16px, 1.4vw, 21px)/1.2 var(--serif); color: var(--gold); }
#ov-minds .mn-intro.in li { animation: mnRise .9s cubic-bezier(.2, .7, .2, 1) both; }
#ov-minds .mn-intro.in li:nth-child(2) { animation-delay: .12s; } #ov-minds .mn-intro.in li:nth-child(3) { animation-delay: .24s; }

/* mind panels: the HUD readout */
#ov-minds .mn-panel { position: absolute; left: var(--gut); top: 50%; transform: translateY(-50%); width: min(470px, 36vw); display: flex; flex-direction: column; gap: 12px; opacity: 0;
  background: linear-gradient(90deg, rgba(5, 5, 6, .82), rgba(5, 5, 6, .35) 80%, transparent); padding: 18px 24px 20px 0; }
#ov-minds #mn-jarvis { --acc: #5eead4; --g1: #ece6da; --g2: #e8c37a; }
#ov-minds #mn-nemo { --acc: #8fc8ff; --g1: #dbeaff; --g2: #a78bfa; }
#ov-minds #mn-brainz { --acc: #e8c37a; --g1: #ece6da; --g2: #5eead4; }
#ov-minds .mn-eye { color: var(--acc); display: flex; align-items: center; gap: 12px; }
#ov-minds .mn-eye i { width: 28px; height: 1px; background: var(--acc); flex: none; box-shadow: 0 0 8px var(--acc); }
#ov-minds .mn-eye b { font-weight: 500; color: var(--ink); }
#ov-minds .mn-name { font: 700 clamp(58px, 7.4vw, 124px)/.86 var(--display); letter-spacing: -.035em; margin-left: -.04em; white-space: nowrap;
  background: linear-gradient(100deg, var(--g1, #ece6da) 30%, var(--g2, #e8c37a)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 26px rgba(5, 5, 6, .9)); }
#ov-minds .mn-tag { font: italic 400 clamp(19px, 1.65vw, 26px)/1.2 var(--serif); color: var(--gold); max-width: 22em; }
#ov-minds .mn-body { color: #c4bdb0; font-size: 15px; line-height: 1.5; max-width: 30em; }
#ov-minds .mn-rows { list-style: none; display: flex; flex-direction: column; margin-top: 4px; border-top: 1px solid rgba(58, 55, 48, .8); }
#ov-minds .mn-rows li { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid rgba(58, 55, 48, .45); position: relative;
  opacity: 0; transform: translateX(-12px); transition: opacity .45s ease, transform .55s cubic-bezier(.2, .8, .2, 1); }
#ov-minds .mn-rows li::after { content: ''; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%; background: linear-gradient(90deg, var(--acc), transparent); transform: scaleX(0); transform-origin: left; transition: transform .7s cubic-bezier(.2, .8, .2, 1); opacity: .8; }
#ov-minds .mn-rows li.in { opacity: 1; transform: none; }
#ov-minds .mn-rows li.in::after { transform: scaleX(1); }
#ov-minds .mn-rows span { color: var(--acc); font-size: 10px; }
#ov-minds .mn-rows b { font-weight: 400; font-size: 14px; line-height: 1.35; color: var(--ink); }
#ov-minds .mn-foot { color: var(--dim); font-size: 10px; opacity: 0; transition: opacity .6s; }
#ov-minds .mn-foot.in { opacity: 1; }
#ov-minds #mn-nemo .mn-foot { display: none; }
#ov-minds .mn-panel.swap .mn-eye { animation: mnSwap .5s ease both; }
#ov-minds .mn-panel.swap .mn-name { animation: mnSlam .7s cubic-bezier(.2, .9, .25, 1) both; }
#ov-minds .mn-panel.swap .mn-tag { animation: mnSwap .6s .15s ease both; }
#ov-minds .mn-panel.swap .mn-body { animation: mnSwap .6s .25s ease both; }

/* brain card */
#ov-minds .mn-brain { --acc: #e8c37a; gap: 10px; }
#ov-minds .mn-brain .mn-name { --g1: #ece6da; --g2: var(--acc); font-size: clamp(56px, 6.6vw, 112px); }
#ov-minds .mn-model { color: var(--ink); font-size: 12px; letter-spacing: .06em; border-left: 2px solid var(--acc); padding-left: 10px; }
#ov-minds .mn-job { color: #c4bdb0; font-size: 15px; line-height: 1.5; max-width: 30em; min-height: 1.5em; }
#ov-minds .mn-stat { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; padding-top: 12px; border-top: 1px solid rgba(58, 55, 48, .8); }
#ov-minds .mn-stat b { font: 700 clamp(40px, 4.4vw, 70px)/.95 var(--display); letter-spacing: -.03em; color: var(--acc); text-shadow: 0 0 30px color-mix(in srgb, var(--acc) 45%, transparent); }
#ov-minds .mn-stat span { color: var(--dim); font-size: 10px; }
#ov-minds .mn-scale { margin-top: 8px; }
#ov-minds .mn-track { position: relative; height: 14px; border-bottom: 1px solid var(--faint); }
#ov-minds .mn-track::before { content: ''; position: absolute; inset: auto 0 -1px 0; height: 1px; background: repeating-linear-gradient(90deg, var(--faint) 0 1px, transparent 1px 10%); }
#ov-minds .mn-track i { position: absolute; bottom: -4px; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: var(--c); opacity: .35; transition: opacity .3s, transform .3s, box-shadow .3s; }
#ov-minds .mn-track i.on { opacity: 1; transform: scale(1.6); box-shadow: 0 0 12px var(--c); }
#ov-minds .mn-scale p { display: flex; justify-content: space-between; color: var(--faint); font-size: 9px; margin-top: 6px; }
#ov-minds .mn-brain.swap .mn-name { animation: mnSlam .65s cubic-bezier(.2, .9, .25, 1) both; }
#ov-minds .mn-brain.swap .mn-model { animation: mnSwap .5s .1s ease both; }
#ov-minds .mn-brain.swap .mn-job { animation: mnSwap .5s .18s ease both; }
#ov-minds .mn-brain.swap .mn-stat { animation: mnSwap .5s .28s ease both; }

/* NEMO terminal */
#ov-minds .mn-term { position: absolute; right: 28px; bottom: 4vh; width: min(360px, 26vw); padding: 12px 14px 14px; border: 1px solid rgba(143, 200, 255, .28); background: rgba(5, 6, 10, .72);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%); opacity: 0; font-size: 11px; letter-spacing: .03em; line-height: 1.55; }
#ov-minds .mn-th { color: var(--ice); font-size: 9px; letter-spacing: .12em; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid rgba(143, 200, 255, .2); }
#ov-minds .mn-tl { min-height: 6.4em; display: flex; flex-direction: column; gap: 4px; }
#ov-minds .mn-tl p { color: #c4bdb0; unicode-bidi: plaintext; }
#ov-minds .mn-tl p span { color: var(--dim); margin-inline-end: 6px; }
#ov-minds .mn-tl p.a { color: #dbeaff; }
#ov-minds .mn-tl p.a span { color: var(--vio); }
#ov-minds .mn-tl i { display: inline-block; width: 6px; height: 10px; background: var(--ice); margin-inline-start: 2px; vertical-align: -1px; }

/* 3D-anchored callouts */
#ov-minds .mn-cos { position: absolute; inset: 0; }
#ov-minds .mn-co { position: absolute; left: 0; top: 0; opacity: 0; will-change: transform; white-space: nowrap; }
#ov-minds .mn-co i { position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px var(--teal); }
#ov-minds .mn-co::before { content: ''; position: absolute; top: 0; width: 64px; height: 1px; background: linear-gradient(90deg, var(--teal), rgba(94, 234, 212, .2)); }
#ov-minds .mn-co b, #ov-minds .mn-co span { position: absolute; display: block; font-weight: 500; }
#ov-minds .mn-co b { top: -16px; color: var(--ink); font-size: 10px; }
#ov-minds .mn-co span { top: 6px; color: var(--dim); font-size: 9px; }
#ov-minds .mn-co.r::before { left: 4px; } #ov-minds .mn-co.r b, #ov-minds .mn-co.r span { left: 74px; }
#ov-minds .mn-co.l::before { right: 4px; transform: scaleX(-1); } #ov-minds .mn-co.l b, #ov-minds .mn-co.l span { right: 74px; text-align: right; }
#ov-minds .mn-co.in::before { animation: mnLine .6s cubic-bezier(.2, .8, .2, 1) both; }
#ov-minds .mn-co.l.in::before { animation-name: mnLineL; }
#ov-minds .mn-co.in b, #ov-minds .mn-co.in span { animation: mnSwap .5s .2s ease both; }
#ov-minds .mn-cl { position: absolute; left: 0; top: 0; color: var(--dim); font-size: 10px; opacity: 0; white-space: nowrap; will-change: transform; display: flex; gap: 6px; }
#ov-minds .mn-cl span { color: var(--c); }
#ov-minds .mn-cl.on { color: var(--ink); }

/* target bracket */
#ov-minds .mn-brk { --c: #5eead4; position: absolute; left: 0; top: 0; opacity: 0; will-change: transform; }
#ov-minds .mn-brk i { position: absolute; width: 18px; height: 18px; border: 1px solid var(--c); filter: drop-shadow(0 0 4px var(--c)); }
#ov-minds .mn-brk i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; }
#ov-minds .mn-brk i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; }
#ov-minds .mn-brk i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; }
#ov-minds .mn-brk i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; }
#ov-minds .mn-brk span { position: absolute; left: 0; bottom: -20px; color: var(--c); font-size: 9px; white-space: nowrap; }

@keyframes mnSwap { from { opacity: 0; transform: translateY(8px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes mnSlam { 0% { opacity: 0; transform: translateX(-18px) scaleX(1.08); filter: blur(8px); letter-spacing: .04em; } 60% { opacity: 1; filter: none; } 100% { opacity: 1; transform: none; letter-spacing: -.035em; } }
@keyframes mnRise { from { opacity: 0; transform: translateY(18px); filter: blur(5px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes mnLine { from { transform: scaleX(0); transform-origin: left; } to { transform: scaleX(1); transform-origin: left; } }
@keyframes mnLineL { from { transform: scaleX(0); transform-origin: right; } to { transform: scaleX(-1); transform-origin: right; } }

/* ---- phones ---- */
@media (max-width: 760px) {
  #ov-minds .mn-ghost { display: none; }
  #ov-minds .mn-tabs { left: 16px; right: 16px; top: 60px; gap: 4px; }
  #ov-minds .mn-tabs span { flex: 1; min-width: 0; padding: 6px 8px 7px; font-size: 9px; gap: 4px; }
  #ov-minds .mn-intro { left: 16px; right: 16px; bottom: 76px; gap: 14px; }
  #ov-minds .mn-intro ul { grid-template-columns: 1fr; }
  #ov-minds .mn-intro li { flex-direction: row; align-items: baseline; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--faint); }
  #ov-minds .mn-intro li + li { padding-left: 0; border-left: 0; }
  #ov-minds .mn-intro li b { font-size: 26px; }
  #ov-minds .mn-intro li em { font-size: 15px; margin-left: auto; text-align: right; }
  #ov-minds .mn-panel { left: 16px; right: 16px; width: auto; top: auto; bottom: 52px; transform: none; gap: 8px; padding: 34px 0 0;
    background: linear-gradient(transparent, rgba(5, 5, 6, .9) 34px, rgba(5, 5, 6, .94)); }
  #ov-minds .mn-name { font-size: 50px; }
  #ov-minds .mn-brain .mn-name { font-size: 46px; }
  #ov-minds .mn-tag { font-size: 18px; }
  #ov-minds .mn-body, #ov-minds .mn-job { font-size: 13.5px; }
  #ov-minds .mn-panel.p2 .mn-body { display: none; }
  #ov-minds .mn-rows li { grid-template-columns: 70px 1fr; gap: 8px; padding: 4px 0; }
  #ov-minds .mn-rows b { font-size: 12.5px; }
  #ov-minds .mn-rows span { font-size: 9px; }
  #ov-minds .mn-foot { display: none; }
  #ov-minds .mn-stat b { font-size: 38px; }
  #ov-minds .mn-term { display: none; }
  #ov-minds .mn-co, #ov-minds .mn-brk span { display: none; }
  #ov-minds .mn-cl { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  #ov-minds .mn-panel.swap *, #ov-minds .mn-intro.in li, #ov-minds .mn-co.in *, #ov-minds .mn-co.in::before { animation: none !important; }
}
