/* AMLAB V3 · original logo, additive layers and a red laser. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: amlab-page-out .16s ease-in both; }
::view-transition-new(root) { animation: amlab-page-in .24s ease-out both; }
html.amlab-transition-fallback body { animation: amlab-page-in .2s ease-out both; }
html.amlab-page-leaving body { animation: amlab-page-out .11s ease-in both; }
@keyframes amlab-page-in { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }
@keyframes amlab-page-out { from { opacity:1; } to { opacity:0; } }

.amlab-intro {
  position:fixed; inset:0; z-index:10000; display:grid; place-items:center;
  overflow:hidden; background:#070809; color:#f6f5f2;
  animation:amlab-intro-exit .28s 1.92s ease-in forwards;
}
.amlab-intro::before {
  content:""; position:absolute; inset:0; pointer-events:none;
  background:radial-gradient(ellipse at 50% 52%,rgba(236,55,69,.12),transparent 58%);
}
.amlab-print-scene { position:relative; width:min(680px,78vw); padding:74px 0 108px; }
.amlab-print-mark { position:relative; width:100%; aspect-ratio:1028 / 153; }
.amlab-print-bed {
  position:absolute; left:-8%; right:-8%; top:calc(50% + 4px); height:150px;
  transform:perspective(620px) rotateX(68deg); transform-origin:center top;
  border:1px solid rgba(236,55,69,.34); background-color:#0d0f12;
  background-image:linear-gradient(rgba(236,55,69,.13) 1px,transparent 1px),linear-gradient(90deg,rgba(236,55,69,.13) 1px,transparent 1px);
  background-size:32px 32px; box-shadow:0 8px 0 #17191d,0 9px 0 rgba(236,55,69,.3),0 30px 45px #000;
}
.amlab-print-logo,.amlab-print-depth,.amlab-print-layers {
  position:absolute; inset:0; background:url('/assets/amlab-logo.png') center / contain no-repeat;
  clip-path:inset(100% 0 0 0); animation:amlab-print-build 1.38s .18s steps(38,end) forwards;
}
.amlab-print-depth { transform:translate(0,6px); filter:brightness(.3); }
.amlab-print-logo { filter:drop-shadow(0 0 10px rgba(236,55,69,.22)); }
.amlab-print-layers {
  background:repeating-linear-gradient(0deg,transparent 0 2px,rgba(7,8,9,.34) 2px 3px);
  -webkit-mask:url('/assets/amlab-logo.png') center / contain no-repeat;
  mask:url('/assets/amlab-logo.png') center / contain no-repeat;
  animation:amlab-print-build 1.38s .18s steps(38,end) forwards,amlab-layers-fade .35s 1.57s forwards;
}
.amlab-print-laser {
  position:absolute; z-index:2; left:-2%; width:104%; bottom:0; height:1px;
  background:linear-gradient(90deg,transparent,#ec3745 15%,#ffbcc1 50%,#ec3745 85%,transparent);
  box-shadow:0 0 5px #ff525e,0 0 18px rgba(236,55,69,.8);
  opacity:0; animation:amlab-laser-rise 1.38s .18s linear forwards;
}
.amlab-print-laser::before {
  content:""; position:absolute; top:-3px; left:0; height:7px; width:7px;
  background:#fff1f2; border-radius:50%; box-shadow:0 0 8px #fff,0 0 24px #ec3745;
  animation:amlab-laser-pass .115s .18s linear 12 alternate;
}
.amlab-print-caption {
  position:absolute; bottom:8px; left:0; right:0; text-align:center;
  font:500 10px / 1.7 'IBM Plex Mono',monospace; letter-spacing:.18em; text-transform:uppercase; color:#9b9fa6;
}
.amlab-print-caption::before { content:""; display:inline-block; width:5px; height:5px; margin-right:10px; background:#ec3745; border-radius:50%; }
.amlab-intro-skip {
  position:absolute; right:max(24px,env(safe-area-inset-right)); bottom:max(24px,env(safe-area-inset-bottom));
  padding:12px 15px; min-height:44px; color:#b7b9be; background:transparent; border:1px solid rgba(255,255,255,.22);
  font:500 10px / 1.6 'IBM Plex Mono',monospace; letter-spacing:.08em; text-transform:uppercase;
}
.amlab-intro-skip:hover { color:#fff; border-color:#ec3745; }
.amlab-intro-skip:focus-visible { outline:2px solid #ec3745; outline-offset:5px; }
@keyframes amlab-print-build { to { clip-path:inset(0 0 0 0); } }
@keyframes amlab-laser-rise { 0% { bottom:0; opacity:0; } 3%,94% { opacity:1; } 100% { bottom:100%; opacity:0; } }
@keyframes amlab-laser-pass { to { left:calc(100% - 7px); } }
@keyframes amlab-layers-fade { to { opacity:.22; } }
@keyframes amlab-intro-exit { to { opacity:0; visibility:hidden; pointer-events:none; } }
@media(max-width:640px) {
  .amlab-print-scene { width:80vw; padding:64px 0 92px; }
  .amlab-print-bed { height:100px; background-size:22px 22px; }
  .amlab-print-caption { font-size:9px; letter-spacing:.12em; }
}
/* This applies immediately, including when the system preference changes. */
@media(prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto!important; }
  *,*::before,*::after { animation-duration:.001ms!important; animation-iteration-count:1!important; transition-duration:.001ms!important; scroll-behavior:auto!important; }
  .amlab-intro { display:none!important; }
  html.amlab-page-leaving body { opacity:1!important; transform:none!important; }
  ::view-transition-old(root),::view-transition-new(root) { animation:none!important; }
}
