.site-intro:not([open]), .intro-identity[hidden] { display: none; }
html[data-intro-open] { overflow: hidden; }
.site-intro {
  --intro-inset: clamp(1.2rem, 4.3vw, 4.5rem);
  position: fixed; inset: 0; margin: 0; padding: 0; border: 0; width: 100%; height: 100%;
  max-width: none; max-height: none; color: #faf6ef; background: #050811;
  overflow: auto; overscroll-behavior: contain;
}
.site-intro::backdrop { background: #050811; }
.intro-visual { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.intro-visual > div { position: absolute; inset: 0; }
.intro-deep { background: radial-gradient(ellipse at 62% 46%, #1a2843, #080d1a 38%, #04060e 77%); }
.intro-flight { position: absolute; inset: 0; width: 100%; height: 100%; }
.intro-galaxy, .intro-shore { opacity: 0; background-repeat: no-repeat; background-size: cover; }
.intro-galaxy { background: #05060c; overflow: hidden; transition: opacity .32s ease; }
.intro-galaxy img { display: block; width: 100%; height: 100%; object-fit: contain; transform: scale(var(--approach,1.08)); transform-origin: center; }
.intro-galaxy[data-galaxy="m31"] { --approach: 1.10; }
.intro-galaxy[data-galaxy="m51"] { --approach: 1.02; }
.intro-galaxy[data-galaxy="m104"] { --approach: 1.06; }
.intro-galaxy[data-active] { opacity: 1; }
.intro-galaxy[data-active] img { animation: intro-through 1550ms cubic-bezier(.15,.56,.3,1) both; }
.site-intro[open] .intro-shore {
  background-image: url('/lakeside-empty.webp'); background-position: 66% 62%;
  transform-origin: 64% 52%;
}
.site-intro[data-stage="landed"] .intro-shore { animation: intro-arrive 820ms cubic-bezier(.2,.72,.3,1) both; }
.intro-shade {
  background: linear-gradient(90deg, #06091391, #06091331 53%, #06091302 78%),
    linear-gradient(0deg, #040710bd, transparent 25%, transparent 79%, #0407106b);
  opacity: .43; transition: opacity .5s ease;
}
.site-intro[data-stage="landed"] .intro-shade { opacity: 1; }
.intro-layout {
  position: relative; display: grid; grid-template-rows: auto 1fr auto; min-height: 100%;
  padding: max(1rem, env(safe-area-inset-top)) max(var(--intro-inset), env(safe-area-inset-right))
    max(1.4rem, env(safe-area-inset-bottom)) max(var(--intro-inset), env(safe-area-inset-left));
}
.intro-top, .intro-bottom, .intro-status { display: flex; align-items: center; justify-content: space-between; }
.intro-top .brand-orbit { scale: 1.05; filter: drop-shadow(0 0 10px #e7d5bf58); }
.intro-control {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 44px;
  border: 1px solid #e8efff42; border-radius: 999px; padding: .5rem .93rem;
  background: linear-gradient(155deg,#dce8ff26,#93a5c021 55%,#7288ac19), #11182765;
  box-shadow: inset 0 1px 0 #eef4ff54, 0 5px 20px #0005;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  cursor: pointer; font-size: .84rem; font-weight: 650;
}
.intro-control svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.intro-control:hover { border-color: #f5e3c8ba; filter: brightness(1.23); }
.intro-control:active { filter: brightness(.9); }
.intro-identity {
  grid-row: 2; place-self: center start; width: min(36rem, 100%); margin-block: 2rem 3rem;
  text-shadow: 0 2px 26px #02040ddd;
}
.intro-identity:not([hidden]) { animation: intro-title 650ms var(--ease) both; }
.intro-identity h2 { font-size: clamp(4.5rem, 11.9vw, 10.75rem); line-height: .96; letter-spacing: -.086em; font-weight: 770; white-space: nowrap; }
.intro-identity h2 span { color: #f0d6b7; font-size: .63em; font-weight: 520; letter-spacing: -.039em; vertical-align: .1em; }
.intro-lead { margin: 1.05rem 0 .25rem; font-size: clamp(1.17rem, 2.5vw, 1.8rem); font-weight: 670; line-height: 1.5; letter-spacing: -.025em; }
.intro-purpose { margin: 0 0 1.55rem; color: #e1e6ee; font-size: clamp(.92rem, 1.5vw, 1.06rem); line-height: 1.65; }
.intro-enter {
  gap: .78rem; min-height: 49px; padding-inline: 1.08rem .96rem; font-size: .94rem;
  border-color: #f5dcb39e; color: #fff2df;
  background: linear-gradient(145deg,#f5ddba38,#79665133 61%,#d8b99930), #13162370;
  box-shadow: inset 0 1px 1px #f9eadba6, 0 8px 27px #02040d88;
}
.intro-bottom { grid-row: 3; position: relative; gap: .65rem; }
.intro-status { align-items: center; justify-content: flex-start; gap: .68rem; font-size: .78rem; letter-spacing: .045em; color: #eeeeef; }
.intro-attribution { font-size: .73rem; line-height: 1.35; color: #e3e8f3; text-align: right; max-width: 25rem; text-shadow: 0 1px 5px #010206; }
.intro-track { display: flex; gap: .3rem; }
.intro-track i { width: clamp(7px,1.15vw,13px); height: 2px; border-radius: 99px; background: #c8d7f564; }
[data-stage="deep"] .intro-track i:first-child, [data-stage="m31"] .intro-track i:nth-child(-n+2), [data-stage="m51"] .intro-track i:nth-child(-n+3), [data-stage="m104"] .intro-track i:nth-child(-n+4), [data-stage="landed"] .intro-track i { background: #efd1aa; box-shadow: 0 0 8px #e2bd874a; }
.intro-credits[hidden] { display: none; }
.intro-credits summary { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: .2rem .56rem; border-radius: 8px; color: #e7d6c3; cursor: pointer; font-size: .78rem; white-space: nowrap; }
.intro-credits summary:hover { background: #dbe6ff18; }
.intro-credits > div { position: absolute; right: 0; bottom: calc(100% + .45rem); width: min(26rem, 100%); max-height: min(390px, 60vh); overflow: auto; padding: .9rem 1rem; background: #0e1626f7; border: 1px solid #edf1ff36; border-radius: 13px; box-shadow: 0 10px 28px #0008; font-size: .8rem; line-height: 1.55; }
.intro-credits p { margin: 0; }
.intro-credits ul { margin: .65rem 0; padding: 0; list-style: none; }
.intro-credits li + li { margin-top: .55rem; }
.intro-credits span { display: block; color: #d2dae6; }
.intro-credits a { color: #f4d5ae; text-decoration: underline; text-underline-offset: .19em; }
.intro-replay { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: .83rem; min-height: 44px; padding-inline: .28rem; }
.intro-replay:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .22em; }

@keyframes intro-through { from { transform: scale(var(--approach,1.04)) rotate(-2.3deg); } to { transform: scale(calc(var(--approach,1.04) * 1.18)) rotate(2deg); } }
@keyframes intro-arrive { from { opacity: 0; transform: scale(1.12); } to { opacity: 1; transform: scale(1); } }
@keyframes intro-title { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 640px) {
  .intro-bottom:has(.intro-attribution:not([hidden])) { flex-direction: column; align-items: flex-start; gap: .28rem; }
  .intro-attribution { text-align: left; }
  .site-intro[open] .intro-shore { background-position: 70% center; }
  .intro-galaxy[data-galaxy] { --approach: 1.18; }
  .intro-shade { background: linear-gradient(90deg, #040711a1, #0407111a 95%), linear-gradient(0deg,#04071182,transparent 31%,transparent 77%,#04071155); }
  .intro-identity { margin-block: 2rem 3rem; }
  .intro-identity h2 { font-size: clamp(3.6rem, 16.1vw, 6.35rem); }
}
@media (max-height: 440px) {
  .intro-identity { margin-block: .75rem 1rem; }
  .intro-identity h2 { font-size: clamp(3.2rem, 14vh, 5rem); }
  .intro-lead { margin-top: .52rem; }
  .intro-purpose { margin-bottom: .72rem; }
}
@media (prefers-reduced-motion: reduce) {
  .site-intro .intro-visual > div, .intro-galaxy img, .intro-identity:not([hidden]) { animation: none !important; transition: none; }
  .site-intro[data-stage="landed"] .intro-shore { opacity: 1; }
}
.site-intro[data-still] .intro-shore, .site-intro[data-still] .intro-identity { animation: none !important; opacity: 1; }
@media (prefers-reduced-transparency: reduce) {
  .intro-control { background: #1a2132; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
