/* Opening sequence (home page). Inert unless the head gate sets html.intro-on. */
/* The sequence opens on pure white, which settles into the paper before anything is drawn. */
.intro { position: fixed; inset: 0; z-index: 200; background: #fff; transition: background-color var(--paper-ms, 1000ms) ease-in-out; --tile: clamp(96px, 16vmin, 148px); }
.intro.is-paper { background-color: var(--bg); }
/* The reference's blank paper carries a faint stage light in the centre. It arrives with the
 * paper and fades while the tile grows, so the hand-over to the flat page is seamless. */
.intro::before { content: ""; position: absolute; inset: 0; opacity: 0; background: radial-gradient(ellipse 58% 52% at 50% 50%, rgba(255,255,255,.55), transparent 72%); transition: opacity var(--paper-ms, 1000ms) ease-in-out; }
.intro.is-paper::before { opacity: 1; }
.intro.is-paper.is-morphing::before { opacity: 0; transition-duration: 900ms; }
html:not(.intro-on) .intro:not(.is-leaving) { display: none; }
html.intro-on { overflow: hidden; }
.intro-on .masthead, .intro-on .page-body { visibility: hidden; }
/* Masthead content waits; its entrance starts the moment the sequence hands over. */
.intro-on .masthead *, .intro-on .masthead *::before { animation: none !important; }

.intro-tile, .intro-glyph, .intro-laser {
  position: fixed;
  left: calc(50% - var(--tile) / 2);
  top: calc(50% - var(--tile) / 2);
  width: var(--tile);
  height: var(--tile);
  pointer-events: none;
}
/* The tile is the emblem's square; while it grows into the masthead its blue gives way to the
 * masthead's gradient (the skin), so the hand-over matches exactly. */
.intro-tile { background: var(--emblem); opacity: 0; }
.intro-skin { position: absolute; inset: 0; border-radius: inherit; background: var(--masthead-fill); opacity: 0; }
.intro-glyph { color: #fff; opacity: 0; transform-origin: 50% 50%; }
.intro-laser { overflow: visible; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.laser-core { stroke: #0b6fc4; stroke-width: 1.15; opacity: 0; }
.laser-hot { stroke: #3ea4ff; stroke-width: 3.6; opacity: 0; }
.laser-head { opacity: 0; transition: opacity 160ms ease; }

.intro-skip { position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); padding: 10px 14px; border: 0; border-radius: 10px; background: transparent; color: #8a9cb1; font-size: 12px; font-weight: 600; letter-spacing: .14em; opacity: 0; animation: intro-hint 300ms ease-out 400ms forwards; }
.intro-skip:hover { color: var(--blue); }
@keyframes intro-hint { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .intro-skip { opacity: 1; } }
