/* Intro: icon -> name slides out -> shine across the lockup -> slow fade to the page. Only when html.splash-on. */
.splash { display: none; }
.splash-on .splash {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper);
  animation: splash-out 1.5s cubic-bezier(.4, 0, .2, 1) 3.1s forwards;
}
.splash-on body { overflow: hidden; }
.splash-lock { display: flex; align-items: center; animation: splash-lock-out 1.5s cubic-bezier(.4, 0, .2, 1) 3.1s forwards; }
.splash-icon {
  position: relative; flex: none; width: 88px; height: 88px; border-radius: 22%; overflow: hidden;
  box-shadow: 0 10px 30px rgba(30, 26, 22, .18);
  opacity: 0; transform: scale(.88);
  animation: splash-icon-in .9s cubic-bezier(.2, .7, .2, 1) .15s forwards;
}
.splash-icon img { display: block; width: 100%; height: 100%; }
.splash-name { overflow: hidden; white-space: nowrap; max-width: 0; animation: splash-name-in 1s cubic-bezier(.65, 0, .2, 1) 1.05s forwards; }
.splash-name span {
  display: block; padding: 0 6px 0 18px;
  font-family: var(--serif); font-weight: 500; font-size: 52px; line-height: 1.15; letter-spacing: .015em;
  position: relative; color: var(--ink);
  transform: translateX(-40%);
  animation: splash-name-slide 1s cubic-bezier(.65, 0, .2, 1) 1.05s forwards;
}
/* The glint: a copy of the name painted only where a soft gold band passes, clipped to the letters. */
.splash-name span::after {
  content: attr(data-text); position: absolute; inset: 0; padding: inherit;
  color: transparent; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, #f6e2ac 50%, transparent 62%) 100% 0 / 300% 100% no-repeat;
  -webkit-background-clip: text; background-clip: text;
  animation: splash-name-shine 1.1s cubic-bezier(.45, 0, .25, 1) 2.05s forwards;
}
.splash-name b { font-weight: inherit; }

@keyframes splash-icon-in { to { opacity: 1; transform: none; } }
@keyframes splash-name-in { to { max-width: 320px; } }
@keyframes splash-name-slide { to { transform: none; } }
@keyframes splash-name-shine { to { background-position: 0 0; } }
@keyframes splash-lock-out { to { opacity: 0; transform: scale(1.04); filter: blur(5px); } }
@keyframes splash-out { to { opacity: 0; visibility: hidden; } }

@media (max-width: 520px) {
  .splash-icon { width: 72px; height: 72px; }
  .splash-name span { font-size: 40px; padding-left: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .splash-on .splash { animation: splash-out .5s ease .6s forwards; }
  .splash-lock { animation: none; }
  .splash-icon { animation: splash-icon-in .3s ease forwards; transform: none; }
  .splash-name { animation: none; max-width: 320px; }
  .splash-name span { animation: none; transform: none; }
  .splash-name span::after { display: none; }
}

/* Sound toggle: same borderless look as the theme switch; a speaker with waves when on, crossed when off. */
.sound-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 14px; background: none; color: var(--muted); cursor: pointer;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.sound-btn:hover { color: var(--ink); background: var(--surface-tint); }
.sound-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sound-btn svg { display: block; width: 20px; height: 20px; }
.sound-btn .i-on { display: none; }
.sound-btn.is-on .i-on { display: block; }
.sound-btn.is-on .i-off { display: none; }
