/* Camera movement belongs to the introduction; the walking renderer is left intact. */
html.knight-intro-lock, html.knight-intro-lock body { overflow: hidden; overscroll-behavior: none; }
html.knight-intro-lock { scroll-behavior: auto; scrollbar-gutter: stable; }
html.knight-intro-staging :is(#nav, #hud, #seals, #walker, .sanctum-top) { visibility: hidden; }
html.knight-intro-revealing #walker { animation: intro-grounded 1.2s ease-out both; }
.knight-intro { position: fixed; inset: 0; z-index: 10000; isolation: isolate; color: #f0dbb1; }
.intro-visuals { position: absolute; inset: 0; overflow: hidden; background: #071117; will-change: opacity; }
.intro-camera { position: absolute; left: 0; top: 0; width: 1536px; height: 1024px; opacity: 0; transform-origin: 0 0; will-change: transform; }
.intro-portrait { width: 1536px; height: 1024px; max-width: none; }
/* Only the reflected iris is composited; the portrait's actual eyelids and face never change. */
.intro-iris-inlay { position: absolute; left: 824px; top: 377px; width: 1536px; height: 1024px; opacity: 0;
  background: url(assets/knight-eye-v1.jpg) 0 0 / 1536px 1024px no-repeat;
  transform-origin: 0 0; transform: translate(-45px, -28px) scale(.08203125); will-change: transform;
  /* Mask at native resolution so the final close-up retains the reflected arch's detail. */
  -webkit-mask-image: radial-gradient(ellipse 243.81px 170.667px at 792.381px 512px, #000 52%, transparent 100%);
  mask-image: radial-gradient(ellipse 243.81px 170.667px at 792.381px 512px, #000 52%, transparent 100%); }
.intro-shade { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 53% 46%, transparent 25%, #02090d88 86%), linear-gradient(#02080bd9, transparent 22%, transparent 70%, #02080be6); }
.intro-glint { position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse at 50% 50%, #ffd89425, transparent 40%); mix-blend-mode: screen; }
.intro-heading { position: absolute; top: 5.5%; left: 5.5%; display: flex; align-items: center; gap: 13px;
  font: 500 15px var(--display); letter-spacing: .22em; text-shadow: 0 2px 12px #000; }
.intro-heading svg { width: 25px; height: 25px; color: #c8a468; }
.intro-skip { position: absolute; top: 5.2%; right: 5.5%; display: flex; align-items: center; gap: 20px; padding: 10px 13px;
  border: 1px solid #c7a7724d; border-radius: 2px; background: #07111799; color: #dcd2bc; cursor: pointer;
  font: 11px var(--body); letter-spacing: .07em; backdrop-filter: blur(8px); transition: border-color .2s, background .2s; }
.intro-skip:hover { border-color: #dfbd7e; background: #14232bd9; }
.intro-skip:focus-visible { outline: 2px solid #e1bd79; outline-offset: 4px; }
.intro-skip kbd { font: 10px var(--body); opacity: .55; }
.intro-caption { position: absolute; bottom: 9%; left: 10%; right: 10%; display: flex; align-items: center; justify-content: center; gap: 22px;
  font: 500 11px var(--display); letter-spacing: .3em; text-shadow: 0 2px 10px #000; }
.intro-caption i { width: 45px; height: 1px; background: linear-gradient(90deg, transparent, #c29b58); }
.intro-caption i:last-child { rotate: 180deg; }
.intro-progress { position: absolute; bottom: 5%; left: 43%; right: 43%; height: 1px; background: #d8b98133; }
.intro-progress i { display: block; height: 100%; width: 100%; background: #e0bf7e; transform: scaleX(0); transform-origin: left; box-shadow: 0 0 9px #e7bd6370; }
.is-playing .intro-progress i { animation: intro-progress var(--intro-duration, 4800ms) linear both; }
.is-revealing .intro-visuals {
  -webkit-mask-image: radial-gradient(circle at var(--iris-x, 50%) var(--iris-y, 50%), rgb(0 0 0 / calc(1 - var(--iris-open, 0))) max(0px, calc(var(--iris-radius) - var(--iris-feather))), #000 var(--iris-radius));
  mask-image: radial-gradient(circle at var(--iris-x, 50%) var(--iris-y, 50%), rgb(0 0 0 / calc(1 - var(--iris-open, 0))) max(0px, calc(var(--iris-radius) - var(--iris-feather))), #000 var(--iris-radius)); }
.is-revealing .intro-glint { animation: intro-glint .85s ease-out both; }
.is-revealing :is(.intro-heading, .intro-caption, .intro-progress, .intro-skip) { animation: intro-controls 1.3s ease both; }
.knight-replay { padding: 0 0 1px; color: #b5a179; border: 0; border-bottom: 1px solid #b5a17955; background: none;
  font: inherit; letter-spacing: inherit; cursor: pointer; }
.knight-replay:hover { color: #eed8a8; border-color: currentColor; }
.knight-replay:focus-visible { outline: 1px solid #e1bd79; outline-offset: 4px; }
@keyframes intro-progress { to { transform: scaleX(1); } }
@keyframes intro-glint { 18% { opacity: .6; } 100% { opacity: 0; } }
@keyframes intro-controls { 65% { opacity: 1; } 100% { opacity: 0; } }
@keyframes intro-grounded { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 600px) {
  .intro-heading { font-size: 11px; gap: 7px; letter-spacing: .14em; }
  .intro-heading svg { width: 18px; height: 18px; }
  .intro-skip { gap: 10px; font-size: 10px; }
  .intro-caption { font-size: 9px; letter-spacing: .2em; gap: 12px; }
  .intro-caption i { width: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  .knight-intro, .knight-replay { display: none; }
  html.knight-intro-revealing :is(#walker, .sanctum-court) { animation: none; }
}
