body.intro-playing {
  overflow: hidden;
}

.motion-intro {
  --motion-white: #f2f0e9;
  --motion-muted: #98a4ba;
  --motion-blue: #a8c5ff;
  position: fixed;
  inset: 0;
  z-index: 1000;
  isolation: isolate;
  overflow: hidden;
  color: var(--motion-white);
  background: #0b1120;
  font-family: Arial, Helvetica, sans-serif;
}

.motion-intro::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: radial-gradient(ellipse at 67% 48%, #20365a66, transparent 57%);
}

.motion-intro::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23fff' filter='url(%23grain)' opacity='.6' d='M0 0h160v160H0z'/%3E%3C/svg%3E");
}

.motion-header,
.motion-footer {
  position: absolute;
  left: 4.5%;
  right: 4.5%;
  z-index: 6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.motion-header {
  top: max(26px, env(safe-area-inset-top));
}

.motion-signature {
  display: flex;
  align-items: center;
  gap: 17px;
  font-size: 11px;
  letter-spacing: .04em;
}

.motion-signature strong { font-size: 13px; }
.motion-signature > span { color: var(--motion-muted); }
.motion-signature > span::before { content: "/"; margin-right: 17px; opacity: .45; }
.motion-controls { display: flex; align-items: center; gap: 16px; }

.motion-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 9px 0;
  border: 0;
  background: transparent;
  color: var(--motion-white);
  font-size: 11px;
}

.motion-controls button:hover { color: var(--motion-blue); }
.motion-controls button:focus-visible { outline: 1px solid #a8c5ff80; outline-offset: 3px; border-radius: 2px; }
.motion-skip { gap: 18px; }
.motion-skip span { font-size: 18px; }
.motion-pause svg { width: 14px; height: 14px; fill: currentColor; }
.motion-pause .motion-play-icon { display: none; }
.motion-paused .motion-pause-icon { display: none; }
.motion-paused .motion-play-icon { display: block; }

.motion-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.motion-guides {
  position: absolute;
  inset: 112px 4.5% 112px;
  pointer-events: none;
  opacity: .4;
  background:
    linear-gradient(#8a9dbc55, #8a9dbc55) left top / 20px 1px no-repeat,
    linear-gradient(#8a9dbc55, #8a9dbc55) left top / 1px 20px no-repeat,
    linear-gradient(#8a9dbc55, #8a9dbc55) right top / 20px 1px no-repeat,
    linear-gradient(#8a9dbc55, #8a9dbc55) right top / 1px 20px no-repeat,
    linear-gradient(#8a9dbc55, #8a9dbc55) left bottom / 20px 1px no-repeat,
    linear-gradient(#8a9dbc55, #8a9dbc55) left bottom / 1px 20px no-repeat,
    linear-gradient(#8a9dbc55, #8a9dbc55) right bottom / 20px 1px no-repeat,
    linear-gradient(#8a9dbc55, #8a9dbc55) right bottom / 1px 20px no-repeat;
}

.motion-orbit-caption {
  position: absolute;
  right: 9%;
  top: 25%;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--motion-muted);
  font: 9px/1.5 "Courier New", monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: opacity .6s;
}

.motion-orbit-caption::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #a8c5ff;
  box-shadow: 0 0 14px #8bb3ff;
}

.motion-stage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 8%;
  visibility: hidden;
  opacity: 0;
  transition: opacity .45s, visibility .45s;
  pointer-events: none;
}

.motion-stage.is-current { opacity: 1; visibility: visible; }
.motion-eyebrow { margin: 0 0 23px 5px; color: var(--motion-muted); font: 10px/1.4 "Courier New", monospace; letter-spacing: .09em; }
.motion-title { margin: 0; font-size: clamp(76px, 12.8vw, 220px); font-weight: 600; line-height: .87; letter-spacing: -.075em; }
.motion-line { display: block; overflow: hidden; padding: .08em .11em .12em 0; margin: -.08em -.11em -.12em 0; }
.motion-line > span { display: block; transform: translateY(115%) rotate(4deg); transform-origin: 0 100%; transition: transform .85s cubic-bezier(.16, 1, .3, 1); }
.is-current .motion-line > span { transform: translateY(0) rotate(0); }
.is-current .motion-line:nth-child(2) > span { transition-delay: .08s; }
.motion-title em { font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
.motion-title .motion-period { color: var(--motion-blue); }
.motion-stage.is-past .motion-line > span { transform: translateY(-115%) rotate(-3deg); transition-duration: .55s; }

.motion-stage-mind { align-items: center; padding: 0; }
.motion-stage-mind .motion-title { font-size: clamp(120px, 30vw, 520px); letter-spacing: -.08em; padding-right: .08em; }
.motion-stage-mind .motion-eyebrow { align-self: flex-start; margin-left: 8%; }
.motion-stage-mind .motion-title > .motion-line > span { transform: translateY(115%) scale(.85); }
.motion-stage-mind.is-current .motion-title > .motion-line > span { transform: translateY(0) scale(1); }
.motion-stage-mind.is-past .motion-title > .motion-line > span { transform: translateY(-110%) scale(1.15); }
.motion-stage-work .motion-title { font-size: clamp(80px, 13.6vw, 235px); }
.motion-stage-signature { align-items: center; text-align: center; }
.motion-stage-signature .motion-eyebrow { margin-left: 0; }
.motion-stage-signature .motion-title { font-size: clamp(36px, 7.8vw, 135px); letter-spacing: -.065em; }
.motion-signoff { margin-top: 26px; color: #b8c5dd; font-size: 13px; font-weight: 400; letter-spacing: .015em; opacity: 0; transform: translateY(12px); transition: opacity .6s .2s, transform .6s .2s; }
.is-current .motion-signoff { opacity: 1; transform: translateY(0); }
.motion-intro[data-stage="3"] .motion-orbit-caption { opacity: 0; }

.motion-footer { bottom: max(32px, env(safe-area-inset-bottom)); align-items: flex-end; }
.motion-disciplines { display: flex; flex-wrap: wrap; gap: 7px 20px; max-width: 75%; font-size: 10px; color: #74829b; }
.motion-disciplines span { transition: color .5s; }
.motion-disciplines span.is-lit { color: #e4eaf6; }
.motion-counter { font: 10px/1 "Courier New", monospace; letter-spacing: .08em; color: var(--motion-muted); }
.motion-counter strong { color: var(--motion-white); font-weight: 400; }
.motion-progress { position: absolute; bottom: 0; left: 0; height: 2px; width: 100%; background: #a8c5ff; transform: scaleX(0); transform-origin: left; }

.intro-replay {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  border: 0;
  padding: 8px 0 8px 10px;
  background: transparent;
  color: inherit;
  font-size: 10px;
  transition: color .2s;
}

.intro-replay svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.intro-replay:hover { color: #fff; }
.intro-replay:hover svg { transform: rotate(-35deg); transition: transform .4s; }

body.intro-playing .studio-heading,
body.intro-playing .scene-art,
body.intro-playing .scene-film,
body.intro-playing .glass-panel,
body.intro-playing .glass-dock { animation: none; }

:where(body.intro-arrived) .studio-heading { animation: motion-landing-heading 1.15s cubic-bezier(.16, 1, .3, 1) both; }
:where(body.intro-arrived) .scene-art { animation: motion-landing-art 1.5s cubic-bezier(.16, 1, .3, 1) .08s both; }
:where(body.intro-arrived) .scene-film { --motion-landing-x: -50%; animation: motion-landing-panel 1.2s cubic-bezier(.16, 1, .3, 1) .18s both; }
:where(body.intro-arrived) .intro-panel { animation: motion-landing-panel 1s cubic-bezier(.16, 1, .3, 1) .3s both; }
:where(body.intro-arrived) .skills-panel { animation: motion-landing-panel 1s cubic-bezier(.16, 1, .3, 1) .42s both; }
:where(body.intro-arrived) .glass-dock { animation: motion-landing-panel 1s cubic-bezier(.16, 1, .3, 1) .52s both; }

@keyframes motion-landing-heading {
  from { opacity: 0; translate: 0 60px; filter: blur(6px); }
  to { opacity: 1; translate: 0 0; filter: blur(0); }
}

@keyframes motion-landing-art {
  from { opacity: 0; scale: .9; translate: 0 65px; }
  to { opacity: .96; scale: 1; translate: 0 0; }
}

@keyframes motion-landing-panel {
  from { opacity: 0; translate: var(--motion-landing-x, 0px) 45px; }
  to { opacity: 1; translate: var(--motion-landing-x, 0px) 0; }
}

@media (max-width: 700px) {
  .motion-header { top: max(17px, env(safe-area-inset-top)); left: 6%; right: 6%; }
  .motion-signature { gap: 10px; }
  .motion-signature > span { font-size: 9px; }
  .motion-signature > span::before { margin-right: 10px; }
  .motion-controls { gap: 5px; }
  .motion-skip { gap: 9px; }
  .motion-guides { inset: 90px 6% 104px; }
  .motion-orbit-caption { right: 10%; top: 27%; font-size: 8px; }
  .motion-stage { padding: 0 9%; }
  .motion-title { font-size: 17vw; }
  .motion-eyebrow { font-size: 9px; margin-left: 2px; margin-bottom: 19px; }
  .motion-stage-mind { padding: 0; }
  .motion-stage-mind .motion-title { font-size: 31vw; }
  .motion-stage-mind .motion-eyebrow { margin-left: 9%; }
  .motion-stage-work .motion-title { font-size: 23vw; }
  .motion-stage-signature .motion-title { font-size: 10vw; }
  .motion-signoff { font-size: 11px; margin-top: 22px; }
  .motion-footer { left: 9%; right: 9%; bottom: max(30px, env(safe-area-inset-bottom)); }
  .motion-disciplines { max-width: 230px; gap: 10px 15px; font-size: 9px; }
  .intro-replay { grid-column: 1; position: absolute; right: 0; bottom: 0; font-size: 9px; min-height: 36px; }
  .intro-replay span { display: none; }
}

@media (max-height: 500px) and (min-width: 701px) {
  .motion-guides { inset-block: 80px; }
  .motion-title, .motion-stage-work .motion-title { font-size: 20vh; }
  .motion-stage-mind .motion-title { font-size: 48vh; }
  .motion-eyebrow { margin-bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .motion-intro { display: none !important; }
  .intro-replay { display: none; }
  body.intro-arrived .studio-heading,
  body.intro-arrived .scene-art,
  body.intro-arrived .scene-film,
  body.intro-arrived .glass-panel,
  body.intro-arrived .glass-dock { animation: none; }
}
