/* Motion direction: original implementation informed by the supplied Stand Helper reference. */
.motion-toggle { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: var(--paper); transition: background 200ms ease; }
.motion-toggle:hover { background: var(--surface); }
.motion-toggle .icon { width: 17px; height: 17px; }
.motion-play-icon { display: none; }
.motion-paused .motion-pause-icon { display: none; }
.motion-paused .motion-play-icon { display: block; }
.header-inner { gap: 20px; }
.main-nav { margin-left: auto; }
.site-header::after { content: ""; position: absolute; bottom: -1px; left: 0; width: 100%; height: 2px; background: var(--ink); transform: scaleX(var(--page-progress, 0)); transform-origin: left; pointer-events: none; }

/* Word lifts and short monochrome slices, never a repeating text flicker. */
.motion-heading { position: relative; isolation: isolate; }
.heading-ink { display: block; }
.motion-word { display: inline-block; overflow: clip; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; }
.motion-word-inner { display: inline-block; transform: none; }
.motion-design .motion-heading:not(.is-motion-visible) .motion-word-inner { transform: translateY(110%) rotate(2deg); opacity: 0; }
.motion-design .motion-heading.is-motion-visible .motion-word-inner { animation: word-lift 850ms var(--ease) both; animation-delay: calc(var(--word-index, 0) * 45ms); }
.heading-slice { position: absolute; inset: 0; display: block; color: currentColor; pointer-events: none; opacity: 0; text-wrap: inherit; }
.heading-slice-a { clip-path: inset(18% 0 63%); }
.heading-slice-b { clip-path: inset(62% 0 17%); }
.motion-heading.is-slicing .heading-slice-a { animation: heading-cut-a 520ms steps(1, end) both; }
.motion-heading.is-slicing .heading-slice-b { animation: heading-cut-b 520ms steps(1, end) both; }
.motion-heading.is-slicing > .heading-ink { animation: heading-nudge 520ms steps(1, end) both; }
.motion-design .hero-copy.is-visible > h1 { animation: none; }
@keyframes word-lift { from { transform: translateY(110%) rotate(2deg); opacity: 0; } to { transform: translateY(0) rotate(0); opacity: 1; } }
@keyframes heading-cut-a { 0%, 30%, 65%, 100% { opacity: 0; transform: translateX(0); } 10%, 68% { opacity: 1; transform: translateX(10px); } 18%, 76% { opacity: 1; transform: translateX(-7px); } }
@keyframes heading-cut-b { 0%, 36%, 68%, 100% { opacity: 0; transform: translateX(0); } 14%, 72% { opacity: 1; transform: translateX(-11px); } 24%, 82% { opacity: 1; transform: translateX(6px); } }
@keyframes heading-nudge { 0%, 24%, 100% { transform: translateX(0); } 10% { transform: translateX(-2px); } 17% { transform: translateX(2px); } }

/* A mathematical scene with depth; the university content remains the same. */
@media (min-width: 861px) and (hover: hover) {
 .motion-design .coordinate-board { transform: perspective(1200px) translateY(var(--scene-scroll, 0px)) rotateX(var(--scene-rx, 2deg)) rotateY(var(--scene-ry, -4deg)); transform-style: preserve-3d; transition: transform 650ms var(--ease), box-shadow 650ms var(--ease); box-shadow: 15px 20px 45px rgb(0 0 0 / 4%); }
 .motion-design .coordinate-board.is-pointer-active { transition-duration: 130ms; box-shadow: 18px 24px 55px rgb(0 0 0 / 6%); }
 .motion-design .tour-viewer:not(.is-expanded) { transform: perspective(1700px) rotateY(-3deg) rotateX(1deg); transition: transform 800ms var(--ease); }
 .motion-design .tour-viewer:not(.is-expanded):hover { transform: perspective(1700px) rotateY(0) rotateX(0); }
}
.motion-design .tour-viewer.is-expanded { transform: none !important; }
.motion-design .hero-visual { perspective: 1200px; }
.motion-design .hero-label, .motion-design .hero-caption { transform: translateY(var(--hero-detail-shift, 0px)); }

/* A pausable moving band uses only the actual project scopes. */
.motion-ribbon { overflow: hidden; background: var(--ink); color: var(--white); padding-block: 18px; }
.motion-ribbon-track { display: flex; width: max-content; animation: project-ticker 28s linear infinite; }
.motion-ribbon-group { display: flex; flex: 0 0 auto; min-width: 100vw; gap: clamp(24px, 4vw, 64px); align-items: center; justify-content: space-around; padding-right: clamp(24px, 4vw, 64px); white-space: nowrap; font-size: clamp(23px, 2.4vw, 36px); font-weight: 500; letter-spacing: -.035em; }
.ribbon-star { font-size: .75em; }
.motion-ribbon:hover .motion-ribbon-track, .motion-ribbon.is-out-of-view .motion-ribbon-track { animation-play-state: paused; }
@keyframes project-ticker { to { transform: translateX(-50%); } }

/* Image reveal and scroll depth on real city photographs. */
.photo-viewport { display: block; overflow: hidden; border-radius: 10px; }
.motion-design .photo-viewport:not(.is-media-visible) { clip-path: inset(0 0 100% 0); }
.photo-viewport.is-media-visible { animation: photo-curtain 1000ms var(--ease) both; }
.motion-design .city-image:not(.city-image-map) img { transform: translate3d(0, var(--photo-shift, 0px), 0) scale(var(--photo-scale, 1.04)); scale: 1; transition: transform 600ms var(--ease); }
@media (hover: hover) { .motion-design .city-image:not(.city-image-map):hover img { --photo-scale: 1.075; scale: 1; } }
@keyframes photo-curtain { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }

/* Text rolls once under the pointer; duplicate lettering is hidden from accessibility APIs. */
.roll-label { display: inline-block; position: relative; overflow: hidden; vertical-align: top; }
.roll-main, .roll-echo { display: block; transition: transform 400ms var(--ease); }
.roll-echo { position: absolute; inset: 0; transform: translateY(115%); }
@media (hover: hover) {
 .button:hover .roll-main, .nav-assistant:hover .roll-main { transform: translateY(-115%); }
 .button:hover .roll-echo, .nav-assistant:hover .roll-echo { transform: translateY(0); }
}
@keyframes content-in { from { opacity: .1; transform: translateY(12px) scale(.99); filter: blur(3px); } to { opacity: 1; transform: none; filter: blur(0); } }
.motion-design .faculty-feature, .motion-design .career-route article { transition: border-color 300ms ease; }
.motion-design .faculty-feature:hover, .motion-design .career-route article:hover { border-color: var(--ink); }

.motion-paused *, .motion-paused *::before, .motion-paused *::after { animation-play-state: paused !important; transition: none !important; }
.motion-paused { scroll-behavior: auto; }
.motion-paused .reveal, .motion-paused .history-stop { opacity: 1; transform: none; translate: none; }
.motion-paused .heading-slice { display: none; }
.motion-paused .motion-heading .motion-word-inner, .motion-paused .motion-heading > .heading-ink { animation: none !important; opacity: 1; transform: none; }
.motion-paused .photo-viewport { animation: none !important; clip-path: none !important; }
.motion-paused .coordinate-board, .motion-paused .tour-viewer, .motion-paused .city-image img { transform: none !important; box-shadow: none; }
.motion-paused .hero-copy.is-visible > * { animation: none !important; }
.motion-paused .roll-main { transform: none !important; }
.motion-paused .roll-echo { display: none; }
.motion-paused .site-header::after { display: none; }
@media (max-width: 860px) {
 .header-inner { gap: 12px; }
 .menu-toggle { margin-left: auto; margin-right: 0; }
 .motion-toggle { width: 34px; height: 34px; flex-basis: 34px; }
 .main-nav { margin-left: 0; }
 .motion-ribbon { padding-block: 14px; }
}
@media (prefers-reduced-motion: reduce) {
 .motion-heading .motion-word-inner { transform: none !important; opacity: 1 !important; animation: none !important; }
 .heading-slice { display: none; }
 .motion-ribbon-track { animation: none; }
 .photo-viewport { animation: none !important; clip-path: none !important; }
 .coordinate-board, .tour-viewer, .city-image img { transform: none !important; box-shadow: none !important; }
 .roll-main { transform: none !important; }
 .roll-echo { display: none; }
}
.motion-play-icon { display: none; }
.motion-toggle[aria-pressed="true"] .motion-play-icon { display: block; }
.motion-toggle[aria-pressed="true"] .motion-pause-icon { display: none; }
.motion-toggle:disabled { cursor: default; opacity: .5; }
.motion-paused .site-header, .motion-paused .hero-copy > *, .motion-paused .chat-bubble, .motion-paused .main-nav, .motion-paused .assistant-panel, .motion-paused .navigation-toast, .motion-paused .destination-heading, .motion-paused .is-switching { animation: none !important; opacity: 1; translate: none; filter: none; }
.motion-paused .roll-main { transform: none !important; }
.motion-paused .roll-echo { display: none; }
@media (max-width: 860px) {
 .header-inner { gap: 12px; }
 .menu-toggle { margin-left: auto; margin-right: 0; padding-inline: 8px; }
}
