:root {
  color-scheme: dark;
  background: #000;
  --ion-blue: #00bdff;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; min-height: 100%; background: #000; }
body { overflow-x: hidden; }
.stage {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  overflow: hidden;
  /* One finger draws; two fingers can still zoom and pan the page. */
  touch-action: pinch-zoom;
}
.brand {
  position: relative;
  width: min(86vw, 1440px);
  isolation: isolate;
}
/* Frame the supplied artwork without changing or redrawing its pixels. */
.logo-window {
  position: relative;
  width: 100%;
  aspect-ratio: 5.1;
  overflow: hidden;
}
.logo {
  position: absolute;
  width: 130%;
  max-width: none;
  height: auto;
  left: -15%;
  top: 50%;
  transform: translateY(-50%);
  display: block;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}
.scan, .ignition { pointer-events: none; opacity: 0; position: absolute; }
.scan {
  top: -18%; bottom: -18%; left: -16%; width: 16%;
  z-index: 3;
  mix-blend-mode: screen;
  background: linear-gradient(90deg, transparent 0%, #006bff12 26%, #008bff50 68%, #00c8ffb8 94%, #b8f7ffed 99%, transparent);
  -webkit-mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent);
  will-change: transform, opacity;
}
.scan::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: clamp(3px, .3vw, 5px);
  background: #e8fcff;
  box-shadow: 0 0 9px 3px #7ceaff, 0 0 25px 9px #00b8ffcc, 0 0 65px 17px #006aff80;
}
.ignition {
  left: 66%; top: -35%; width: 39%; height: 150%; z-index: 2;
  mix-blend-mode: screen;
  background: radial-gradient(ellipse, #00b8ff75, #007bff30 36%, transparent 70%);
}
.brand.is-entering .logo-reveal {
  animation: materialize 2800ms linear both;
}
.brand.is-entering .scan { animation: scan 2240ms linear 280ms both; }
.brand.is-entering .ignition { animation: ignition 1100ms ease-out 1950ms both; }
@keyframes materialize {
  0% { opacity: 0; filter: blur(3px) brightness(1.7); clip-path: inset(0 100% 0 0); }
  10% { opacity: 1; filter: blur(1px) brightness(1.5); clip-path: inset(0 100% 0 0); }
  90% { opacity: 1; filter: blur(0) brightness(1.25); clip-path: inset(0 0 0 0); }
  100% { opacity: 1; filter: none; clip-path: inset(0 0 0 0); }
}
@keyframes scan {
  0% { transform: translateX(0); opacity: 0; }
  4% { opacity: 1; }
  94% { opacity: 1; }
  100% { transform: translateX(625%); opacity: 0; }
}
@keyframes ignition {
  0%, 100% { opacity: 0; }
  32% { opacity: 1; }
}
#trail { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
@media (max-width: 600px) {
  .brand { width: 92vw; }
  .stage { padding-left: 4vw; padding-right: 4vw; }
}
@media (prefers-reduced-motion: reduce) {
  #trail { display: none; }
  .stage { touch-action: auto; }
  .brand.is-entering .logo-reveal { animation: none; }
  .scan, .ignition { display: none; }
}
