/* The homepage gate activates this brief studio signature on entry or replay. */
.lat-ident { display: none; }
html[data-lat-ident] .lat-ident {
  --monitor: var(--deep);
  --trim: var(--signal);
  --wide: min(78vw, 108vh, 960px);
  --tall: min(60vh, 90vw, 495px);
  --cut: 1.84s;
  display: grid;
  position: fixed;
  z-index: 90;
  inset: 0;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  color: var(--paper);
  touch-action: manipulation;
  animation: lat-ident-finished var(--cut) linear both;
}
.ident-curtain {
  z-index: -2;
  position: absolute;
  inset-block: 0;
  width: calc(50% + 1px);
  background: var(--monitor);
  animation: lat-open-gate .45s 1.36s cubic-bezier(.72,0,.19,1) both;
}
.ident-curtain-left { left: 0; --exit: -101%; }
.ident-curtain-right { right: 0; --exit: 101%; }

.ident-frame {
  --edge: 2px;
  --arm: clamp(13px, 2vw, 25px);
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: -1;
  width: calc(var(--tall) * .5625);
  height: var(--tall);
  transform: translate(-50%, -50%);
  box-shadow: inset 0 0 0 1px #cdd28c35;
  animation: lat-change-format var(--cut) both;
}
.ident-frame i { display: contents; }
.ident-frame i::before, .ident-frame i::after {
  content: "";
  position: absolute;
  width: var(--arm);
  height: var(--arm);
  border-style: solid;
  border-color: var(--trim);
}
.ident-frame i:first-child::before { top: 0; left: 0; border-width: var(--edge) 0 0 var(--edge); }
.ident-frame i:first-child::after { top: 0; right: 0; border-width: var(--edge) var(--edge) 0 0; }
.ident-frame i:last-child::before { bottom: 0; left: 0; border-width: 0 0 var(--edge) var(--edge); }
.ident-frame i:last-child::after { bottom: 0; right: 0; border-width: 0 var(--edge) var(--edge) 0; }

.ident-signature {
  display: grid;
  justify-items: center;
  width: calc(var(--tall) * .46);
  gap: clamp(7px, 1.3vh, 13px);
  animation: lat-mark-cut var(--cut) both;
}
.ident-mark { display: block; width: clamp(72px, 12vh, 96px); height: auto; }
.ident-spelling {
  font: 650 clamp(7px, .86vw, 12px)/1.25 Inter,Arial,sans-serif;
  letter-spacing: .30em;
  text-indent: .30em;
  text-transform: uppercase;
}
.ident-accessible {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.ident-skip {
  position: absolute;
  right: max(clamp(18px,4vw,64px),env(safe-area-inset-right));
  bottom: max(clamp(17px,3vw,48px),env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding: 7px 5px 7px 12px;
  border: 0;
  background: none;
  color: var(--paper);
  font: 560 12px/1.3 Inter,Arial,sans-serif;
  cursor: pointer;
}
.ident-skip i { position: relative; width: 19px; height: 1px; background: currentColor; }
.ident-skip i::after {
  content: ""; position: absolute; right: 1px; top: -3px; width: 6px; height: 6px;
  border-top: 1px solid; border-right: 1px solid; transform: rotate(45deg);
}
.ident-skip:focus-visible { outline: 2px solid var(--trim); outline-offset: 4px; }

@keyframes lat-change-format {
  0%, 16% {
    width: var(--wide); height: calc(var(--wide) * .5625); opacity: 1;
    animation-timing-function: cubic-bezier(.71,0,.19,1);
  }
  56%, 71% { width: calc(var(--tall) * .5625); height: var(--tall); opacity: 1; }
  81%, 100% { opacity: 0; }
}
@keyframes lat-mark-cut {
  0%, 8% { clip-path: inset(0 51%); opacity: 0; }
  24%, 70% { clip-path: inset(0); opacity: 1; }
  80%, 100% { clip-path: inset(48% 0); opacity: 0; }
}
@keyframes lat-open-gate {
  from { transform: translateX(0); }
  to { transform: translateX(var(--exit)); }
}
@keyframes lat-ident-finished {
  0%, 96% { opacity: 1; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html[data-lat-ident="initial"] .lat-ident { display: none; }
  html[data-lat-ident="replay"] .lat-ident, .lat-ident * { animation: none !important; }
}
