/* Mechanical aperture: independent of the gallery and game styles. */
:root { --intro-ready: 1; }
html.intro-pending::after {
 content: ''; position: fixed; inset: 0; z-index: 9999; background: #eef2f5;
 pointer-events: none;
}
.intro {
 --intro-duration: 4400ms;
 position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh;
 max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
 overflow: hidden; background: transparent; color: #233e4b; color-scheme: light;
}
.intro::backdrop { background: transparent; }
.intro.has-3d { --intro-duration: 6200ms; }
.intro-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; opacity: 0; }
.intro.has-3d .intro-machine { z-index: 2; }
.intro.has-3d .intro-panel, .intro.has-3d .intro-seal { display: none; }
.intro.has-3d.is-running .intro-ring { animation-name: intro-pilot; }
.intro.has-3d .intro-copy, .intro.has-3d .intro-caption { z-index: 3; }
.intro.has-3d.is-running .intro-white { animation-name: intro-3d-white; }
@keyframes intro-pilot {
 0% { opacity: 0; transform: scale(.25) rotate(-30deg); }
 8%, 18% { opacity: 1; transform: scale(.3) rotate(0); }
 31% { opacity: .8; transform: scale(.72) rotate(90deg); }
 43%, 100% { opacity: 0; transform: scale(1.1) rotate(120deg); }
}
@keyframes intro-3d-white { 0%, 43% { opacity: 1; } 56%, 100% { opacity: 0; } }
.intro-scene { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.intro-white { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 46%, #fff, #e6ebf0); }
.intro-machine { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke-width: 1; }
.intro-panel { transform-box: view-box; transform-origin: center; }
.intro-face { fill: url(#intro-ceramic); stroke: #bccbd3; stroke-width: 1.1; }
.intro-edge { fill: #8ca0ad; stroke: #a9c0cb; stroke-width: 2; }
.intro-groove { stroke: #b5c3cc; stroke-width: .8; fill: none; }
.intro-rail { stroke: #28cbe6; stroke-width: 2; fill: none; }
.intro-bolt { fill: #587685; stroke: #f8fdff; stroke-width: 1; }
.intro-seal { fill: #f1f5f7; stroke: #ccd9df; stroke-width: 1; transform-origin: center; }
.intro-ring { transform-origin: center; }
.intro-ring-base { stroke: #aabfc9; stroke-width: 1; }
.intro-ring-light { stroke: #39d9ed; stroke-width: 4; stroke-dasharray: 170 42 92 96; }
.intro-ring-fine { stroke: #31647a; stroke-width: 1.2; stroke-dasharray: 74 120 18 66; }
.intro-beam { stroke: #26cae6; stroke-width: 1.3; stroke-dasharray: 2400; stroke-dashoffset: 2400; }
.intro-beam.thin { stroke: #aec9d4; stroke-width: .7; }
.intro-copy {
 position: absolute; left: clamp(24px, 4vw, 64px); top: max(32px, env(safe-area-inset-top));
 font: 12px/1.6 'Courier New', monospace; letter-spacing: .12em;
}
.intro-copy p { margin: 0 0 8px; }
.intro-copy .intro-name { font: 600 15px/1.5 Arial, sans-serif; letter-spacing: .24em; }
.intro-copy small { display: block; font-size: 12px; letter-spacing: .08em; color: #516a77; }
.intro-caption {
 position: absolute; left: 50%; bottom: max(72px, calc(env(safe-area-inset-bottom) + 56px));
 transform: translateX(-50%); width: max-content; max-width: calc(100% - 48px);
 font: 12px/1.5 'Courier New', monospace; letter-spacing: .16em; text-align: center;
}
.intro-caption::after { content: ''; display: block; height: 1px; width: 120px; background: #35bfd9; margin: 18px auto 0; transform-origin: left; }
.intro-skip {
 z-index: 4;
 position: absolute; right: max(24px, env(safe-area-inset-right));
 bottom: max(20px, calc(env(safe-area-inset-bottom) + 12px));
 min-height: 44px; padding: 10px 18px; border: 1px solid #7f99a8;
 border-radius: 2px; background: #f4f8faf2; color: #203e4e;
 font: 13px/1.5 Arial, 'Hiragino Kaku Gothic ProN', sans-serif; letter-spacing: .08em;
 cursor: pointer;
}
.intro-skip:hover { background: #fff; border-color: #167e9b; }
.intro-skip:focus-visible { outline: 2px solid #007b9c; outline-offset: 4px; }
.intro.is-running .intro-scene { animation: intro-scene var(--intro-duration) linear both; }
.intro.is-running .intro-white { animation: intro-white var(--intro-duration) linear both; }
.intro.is-running .intro-panel { animation: intro-panel var(--intro-duration) cubic-bezier(.65,0,.2,1) both; }
.intro.is-running .intro-seal { animation: intro-seal var(--intro-duration) cubic-bezier(.65,0,.2,1) both; }
.intro.is-running .intro-ring { animation: intro-ring var(--intro-duration) cubic-bezier(.5,0,.2,1) both; }
.intro.is-running .intro-beam { animation: intro-beam var(--intro-duration) ease-in-out both; }
.intro.is-running .intro-copy,
.intro.is-running .intro-caption { animation: intro-copy var(--intro-duration) linear both; }
.intro.is-running .intro-caption::after { animation: intro-progress var(--intro-duration) linear both; }
@keyframes intro-white { 0%, 43% { opacity: 1; } 61%, 100% { opacity: 0; } }
@keyframes intro-scene { 0%, 88% { opacity: 1; } 100% { opacity: 0; } }
@keyframes intro-panel {
 0%, 19% { opacity: 0; transform: translate(0, 0); }
 36% { opacity: 1; transform: translate(0, 0); }
 49% { opacity: 1; transform: translate(var(--unlatch-x), var(--unlatch-y)); }
 59% { opacity: 1; transform: translate(var(--unlatch-x), var(--unlatch-y)); }
 100% { opacity: 1; transform: translate(var(--open-x), var(--open-y)) rotate(var(--twist)); }
}
@keyframes intro-seal { 0%, 43% { transform: scale(1); opacity: 1; } 61%, 100% { transform: scale(.08); opacity: 0; } }
@keyframes intro-ring {
 0% { transform: scale(.25) rotate(-45deg); opacity: 0; }
 8%, 17% { transform: scale(.3) rotate(0deg); opacity: 1; }
 36%, 44% { transform: scale(1) rotate(90deg); opacity: 1; }
 60% { transform: scale(1.22) rotate(115deg); opacity: 1; }
 88%, 100% { transform: scale(2.5) rotate(140deg); opacity: 0; }
}
@keyframes intro-beam {
 0%, 12% { stroke-dashoffset: 2400; opacity: 0; }
 20% { opacity: 1; }
 42%, 56% { stroke-dashoffset: 0; opacity: 1; }
 78%, 100% { stroke-dashoffset: -2400; opacity: 0; }
}
@keyframes intro-copy { 0% { opacity: 0; } 12%, 45% { opacity: 1; } 63%, 100% { opacity: 0; } }
@keyframes intro-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (max-width: 600px) {
 .intro-copy { top: max(28px, env(safe-area-inset-top)); }
 .intro-copy .intro-name { font-size: 14px; letter-spacing: .16em; }
 .intro-caption { bottom: max(96px, calc(env(safe-area-inset-bottom) + 80px)); font-size: 12px; letter-spacing: .1em; }
}
@media (prefers-reduced-motion: reduce) {
 html.intro-pending::after, .intro { display: none !important; }
 .intro *, .intro *::after { animation: none !important; }
}
