/* Meet Mo, 3D edition */
:root { --m3-pad: clamp(20px, 4vw, 56px); }
canvas.m3-gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* Hero */
.m3-hero { position: relative; height: 100vh; height: 100svh; min-height: 620px; overflow: hidden; border-radius: var(--r); background: radial-gradient(80% 90% at 50% 30%, #2e3ea6 0%, var(--midnight) 45%, #050514 100%); }
.m3-hero .m3-gl { z-index: 1; pointer-events: none; }
.m3-name { position: absolute; z-index: 0; left: clamp(12px, 2vw, 28px); right: clamp(12px, 2vw, 28px); top: clamp(108px, 15vh, 150px); margin: 0; display: flex; flex-direction: column; align-items: center; line-height: .8; font-size: 1rem; max-width: none; }
.m3-name .m3-hi { align-self: flex-start; margin: 0 0 .25em .15em; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.8rem); line-height: 1; color: var(--peri); }
.m3-name .fit-line { display: block; font-size: 15vw; font-weight: 700; letter-spacing: -.05em; line-height: .8; text-transform: uppercase; color: var(--white); white-space: nowrap; }
.m3-hero-foot { position: absolute; z-index: 2; left: var(--m3-pad); right: var(--m3-pad); bottom: clamp(22px, 4vh, 44px); display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.m3-hero-foot p { margin: 0; max-width: 22rem; color: rgba(255, 255, 255, .82); }
.m3-hero-foot p b { display: block; color: var(--white); font-size: 1.1rem; margin-bottom: .3rem; }
.m3-cue { display: inline-flex; align-items: center; gap: 10px; font-size: .85rem; font-weight: 600; color: var(--mist); }
.m3-cue i { display: block; width: 26px; height: 40px; border: 1.5px solid rgba(215, 224, 235, .5); border-radius: 14px; position: relative; }
.m3-cue i::after { content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--peri); animation: m3Wheel 1.6s ease-in-out infinite; }
@keyframes m3Wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* Section shells */
.m3-sec { position: relative; margin-top: var(--gap); }
.m3-head { padding: clamp(48px, 7vw, 96px) var(--m3-pad) 0; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: end; max-width: var(--wrap); margin: 0 auto; }
.m3-head h2 { margin: .3rem 0 0; }
.m3-head p { margin: 0; color: var(--body); }
@media (max-width: 760px) { .m3-head { grid-template-columns: 1fr; } }

/* Journey: camera flies through Mo's story */
.m3-journey { height: 820vh; }
.m3-j-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; border-radius: var(--r); background: radial-gradient(90% 90% at 50% 50%, #141a52 0%, #070720 60%, #03030c 100%); }
.m3-j-sticky .m3-gl { z-index: 0; }
.m3-j-top { position: absolute; z-index: 2; top: clamp(22px, 4vh, 40px); left: var(--m3-pad); right: var(--m3-pad); display: flex; justify-content: space-between; align-items: center; }
.m3-j-top .kicker { margin: 0; color: var(--mist); }
.m3-j-count { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--body); }
.m3-j-count b { color: var(--white); }
.m3-j-text { position: absolute; z-index: 2; left: var(--m3-pad); bottom: clamp(90px, 14vh, 130px); width: min(32rem, 100% - 2 * var(--m3-pad)); pointer-events: none; }
.m3-ch { position: absolute; left: 0; right: 0; bottom: 0; opacity: 0; transform: translateY(24px); transition: opacity .55s, transform .65s cubic-bezier(.2, .7, .1, 1); }
.m3-ch.on { opacity: 1; transform: none; }
.m3-ch .yr { display: block; font-size: clamp(4.4rem, 9vw, 8rem); font-weight: 700; letter-spacing: -.055em; line-height: .85; color: transparent; -webkit-text-stroke: 1.5px rgba(215, 224, 235, .7); margin-bottom: .9rem; }
.m3-ch .meta { display: block; font-size: .85rem; font-weight: 600; color: var(--peri); margin-bottom: .5rem; }
.m3-ch h3 { font-size: clamp(1.6rem, 3vw, 2.5rem); line-height: 1.05; letter-spacing: -.03em; margin: 0 0 .7rem; text-shadow: 0 2px 20px rgba(0, 0, 0, .6); }
.m3-ch p { margin: 0; color: rgba(255, 255, 255, .85); text-shadow: 0 2px 16px rgba(0, 0, 0, .7); }
.m3-ch blockquote { margin: .4rem 0 0; font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--white); }
.m3-rail { position: absolute; z-index: 2; left: var(--m3-pad); right: var(--m3-pad); bottom: clamp(24px, 4vh, 40px); display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid rgba(215, 224, 235, .18); }
.m3-rail-fill { position: absolute; left: 0; top: -1px; height: 2px; width: calc(var(--jp, 0) * 100%); background: var(--peri); }
.m3-rail span { padding-top: 10px; font-size: .75rem; font-weight: 600; color: rgba(215, 224, 235, .4); transition: color .4s; }
.m3-rail span.on { color: var(--white); }
@media (max-width: 760px) {
  .m3-j-text { bottom: 74px; }
  .m3-ch .yr { font-size: 4rem; margin-bottom: .6rem; }
  .m3-ch h3 { font-size: 1.5rem; }
  .m3-ch p { font-size: .9rem; }
  .m3-rail span { font-size: .6rem; }
}

/* Frameworks: objects to turn */
.m3-fw-stage { position: relative; height: min(80vh, 680px); margin: clamp(24px, 3vw, 40px) auto 0; max-width: calc(var(--wrap) + 2 * var(--m3-pad)); border-radius: var(--r); overflow: hidden; background: radial-gradient(70% 80% at 50% 45%, #1d2a78 0%, var(--midnight) 50%, #05051a 100%); cursor: grab; touch-action: pan-y; }
.m3-fw-stage:active { cursor: grabbing; }
.m3-fw-ui { position: absolute; z-index: 2; top: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: rgba(5, 5, 20, .55); border: 1px solid rgba(215, 224, 235, .18); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.m3-fw-ui button { padding: 10px 20px; border: 0; border-radius: 999px; background: transparent; color: var(--mist); font: inherit; font-size: .85rem; font-weight: 700; letter-spacing: .02em; cursor: pointer; }
.m3-fw-ui button[aria-pressed="true"] { background: var(--peri); color: var(--ink); }
.m3-fw-hint { position: absolute; z-index: 2; top: 80px; left: 0; right: 0; text-align: center; font-size: .8rem; color: var(--body); pointer-events: none; }
.m3-fw-legend { position: absolute; z-index: 2; left: var(--m3-pad); right: var(--m3-pad); bottom: 22px; display: grid; gap: 10px; pointer-events: none; }
.m3-fw-legend[hidden] { display: none; }
.m3-fw-legend.three { grid-template-columns: repeat(3, 1fr); }
.m3-fw-legend.four { grid-template-columns: repeat(4, 1fr); }
.m3-fw-legend div { border-top: 1px solid rgba(215, 224, 235, .2); padding-top: 10px; font-size: .85rem; font-weight: 600; }
.m3-fw-legend b { display: block; font-size: 1.4rem; color: var(--peri); line-height: 1; margin-bottom: 4px; }
.m3-fw-legend small { display: block; font-weight: 400; color: var(--body); font-size: .78rem; margin-top: 3px; }
.m3-fw-title { position: absolute; z-index: 2; left: var(--m3-pad); top: 90px; max-width: 18rem; pointer-events: none; }
.m3-fw-title span { display: block; font-size: .8rem; font-weight: 600; color: var(--peri); }
.m3-fw-title strong { display: block; font-size: 1.3rem; line-height: 1.15; margin-top: .3rem; }
@media (max-width: 760px) { .m3-fw-legend small { display: none; } .m3-fw-title { display: none; } .m3-fw-legend div { font-size: .72rem; } }

/* Credentials sphere */
.m3-why { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 72px); align-items: center; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--m3-pad); }
.m3-why-text p { color: rgba(255, 255, 255, .85); font-size: 1.05rem; }
.m3-cloud { position: relative; aspect-ratio: 1; width: 100%; max-width: 560px; justify-self: center; cursor: grab; touch-action: pan-y; user-select: none; }
.m3-cloud:active { cursor: grabbing; }
.m3-cloud::before { content: ""; position: absolute; inset: 12%; border-radius: 50%; background: radial-gradient(circle, rgba(59, 85, 176, .35), transparent 70%); }
.m3-cloud span { position: absolute; left: 50%; top: 50%; padding: 9px 15px; border-radius: 999px; white-space: nowrap; font-size: .82rem; font-weight: 600; color: var(--white); background: rgba(11, 11, 30, .65); border: 1px solid rgba(134, 167, 209, .35); will-change: transform, opacity; }
@media (max-width: 860px) { .m3-why { grid-template-columns: 1fr; } .m3-cloud span { font-size: .72rem; padding: 7px 12px; } }

/* Close */
.m3-close { position: relative; overflow: hidden; border-radius: var(--r); margin-top: var(--gap); padding: clamp(64px, 10vw, 140px) var(--m3-pad); text-align: center; background: radial-gradient(70% 90% at 50% 100%, #2e3ea6 0%, var(--midnight) 50%, #050514 100%); }
.m3-close h2 { font-size: clamp(2.4rem, 6vw, 5rem); line-height: 1; letter-spacing: -.04em; margin: .4rem auto 1rem; max-width: 12em; }
.m3-close p { color: var(--body); max-width: 32rem; margin: 0 auto 1.6rem; }
.m3-close .m3-gl { z-index: 0; pointer-events: none; opacity: .9; }
.m3-close > *:not(canvas) { position: relative; z-index: 1; }

/* No 3D: readable fallback */
.no-gl .m3-journey { height: auto; }
.no-gl .m3-j-sticky { position: relative; height: auto; padding: 96px var(--m3-pad) 40px; }
.no-gl .m3-j-text { position: static; width: auto; }
.no-gl .m3-ch { position: static; opacity: 1; transform: none; margin-bottom: 48px; }
.no-gl .m3-rail, .no-gl .m3-fw-hint { display: none; }
.no-gl .m3-fw-stage { height: auto; padding: 140px 0 120px; cursor: default; }
@media (prefers-reduced-motion: reduce) { .m3-cue i::after { animation: none; } .m3-ch { transition: none; } }
@media (max-width: 760px) {
  .m3-hero-foot { left: 0; right: 0; bottom: 0; padding: 72px 20px 24px; background: linear-gradient(0deg, rgba(5, 5, 20, .96) 45%, rgba(5, 5, 20, 0)); }
  .m3-hero-foot p { max-width: none; font-size: .92rem; }
  .m3-cue { display: none; }
}

/* Hero and closing: light that follows the cursor; Mo stays still */
.m3-glow { position: absolute; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(560px circle at var(--mx, 62%) var(--my, 38%), rgba(134, 167, 209, .42), rgba(59, 85, 176, .18) 40%, transparent 70%), radial-gradient(900px circle at calc(100% - var(--mx, 62%)) calc(100% - var(--my, 38%)), rgba(43, 47, 160, .35), transparent 65%); mix-blend-mode: screen; }
.m3-name { z-index: 1; }
.m3-mo { position: absolute; z-index: 2; left: 50%; bottom: 0; width: min(62vw, 900px); height: auto; transform: translateX(-50%); pointer-events: none; }
.m3-hero-foot { z-index: 3; }
.m3-close .m3-glow { z-index: 0; }
.m3-cloud::before { display: none; }
@media (max-width: 760px) { .m3-mo { width: 230%; max-width: none; bottom: 120px; } }

/* Hero: the name drifts and tilts with the cursor behind Mo */
.m3-hero .m3-name { transform: perspective(1600px) translate3d(calc(var(--nx, 0) * 34px), calc(var(--ny, 0) * 22px), 0) rotateY(calc(var(--nx, 0) * 5deg)) rotateX(calc(var(--ny, 0) * -4deg)) scale(.95); transform-origin: 50% 50%; will-change: transform; }
@media (max-width: 760px) { .m3-hero .m3-name { transform: translate3d(calc(var(--nx, 0) * 14px), calc(var(--ny, 0) * 10px), 0); } }

/* Hero credential tags */
.m3-hero .creds { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; max-width: 24rem; }
.m3-hero .creds li { padding: 9px 14px; border-radius: 999px; border: 1px solid rgba(215, 224, 235, .25); background: rgba(11, 11, 23, .5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-size: .8rem; font-weight: 600; color: var(--white); }
@media (max-width: 760px) { .m3-hero-foot { flex-direction: column; align-items: flex-start; } .m3-hero .creds { justify-content: flex-start; } .m3-hero .creds li { font-size: .72rem; padding: 7px 12px; } }

@media (max-width: 760px) {
  .m3-hero-foot { gap: 12px; padding-top: 56px; }
  .m3-hero-foot p { font-size: 0; }
  .m3-hero-foot p b { font-size: 1.05rem; margin: 0; }
  .m3-hero .creds { gap: 6px; max-width: none; align-self: stretch; width: calc(100% + 20px); margin-right: -20px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-right: 20px; -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); }
  .m3-hero .creds::-webkit-scrollbar { display: none; }
  .m3-hero .creds li { flex: none; font-size: .72rem; padding: 7px 12px; white-space: nowrap; }
}
