/* The entrance: MAZIDEX reads the screen (reviewed in the mock, 2026-10-01).
   Corner brackets lock on while the page boots, then a scan line sweeps down
   and the page appears behind it, with plus marks popping in its wake and a
   readout that ends on a gold MAZI MATCH. Green is the machine reading; gold
   is the answer -- the same language as the brand film and the hero deck's
   front-card scan (beta/scan-motion.css).

   beta/entrance.mjs marks the first home view of a visit before first paint;
   beta/app.mjs runs the sweep once the first view has rendered. Taps pass
   through, and the last rule hides it by itself if the script never runs. */
.app-entrance { display: none; }
html[data-entrance="play"] .app-entrance {
  display: block; position: fixed; inset: 0; z-index: 2147483000; pointer-events: none;
  transition: opacity .24s ease; animation: ae-failsafe .4s 4s forwards;
}
.app-entrance.is-leaving { opacity: 0; }
.ae-cover {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 42%, #e9be4f1a, transparent 50%), #0d0c0a;
}
.ae-mark.brand { font-size: clamp(48px, 9vw, 76px); letter-spacing: .5px; color: #f4f1e9; animation: ae-rise .5s cubic-bezier(.22, 1, .36, 1) both; }
.ae-mark.brand i { width: 8px; height: 8px; margin-left: 7px; }
.ae-fx { position: absolute; inset: 0; }
.ae-corner {
  position: absolute; width: 30px; height: 30px; border: 2px solid #4fe896;
  filter: drop-shadow(0 0 8px #4fe89699); animation: ae-lock .35s cubic-bezier(.22, 1, .36, 1) .06s both;
}
.ae-corner.tl { left: 14px; top: calc(14px + env(safe-area-inset-top, 0px)); border-right: 0; border-bottom: 0; border-top-left-radius: 8px; }
.ae-corner.tr { right: 14px; top: calc(14px + env(safe-area-inset-top, 0px)); border-left: 0; border-bottom: 0; border-top-right-radius: 8px; }
.ae-corner.bl { left: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); border-right: 0; border-top: 0; border-bottom-left-radius: 8px; }
.ae-corner.br { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); border-left: 0; border-top: 0; border-bottom-right-radius: 8px; }
.ae-line { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: #4fe896; box-shadow: 0 0 22px 4px #4fe896b0; opacity: 0; }
.ae-line::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 90px; background: linear-gradient(to top, #4fe89626, transparent); }
.ae-read {
  position: absolute; right: 14px; bottom: 8px; padding: 4px 9px; border: 1px solid #4fe89666; border-radius: 7px;
  background: #0d0c0ae6; font: 500 10px "JetBrains Mono", monospace; letter-spacing: .14em; color: #4fe896; white-space: nowrap;
}
.ae-read.is-match { background: #e9be4f; border-color: #e9be4f; color: #16120a; }
.ae-plus {
  position: absolute; width: 13px; height: 13px; margin: -6.5px; opacity: 0; filter: drop-shadow(0 0 5px #4fe896aa);
  background: linear-gradient(#4fe896, #4fe896) center / 100% 1.5px no-repeat, linear-gradient(#4fe896, #4fe896) center / 1.5px 100% no-repeat;
}
.ae-plus.on { animation: ae-plus .62s cubic-bezier(.22, 1, .36, 1) forwards; }
@keyframes ae-rise { from { opacity: 0; transform: translateY(10px) scale(.96); } }
@keyframes ae-lock { from { opacity: 0; transform: scale(1.6); } }
@keyframes ae-plus { 0% { opacity: 0; transform: scale(0) rotate(-90deg); } 30% { opacity: 1; transform: scale(1.5); } 55% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; } }
@keyframes ae-failsafe { to { opacity: 0; visibility: hidden; } }
