/* The opening splash, shared by the events hub and the event pages (public/design/splash.js on the hub,
   hideSplash() in app.js on event pages). Once per browser session, on whichever page opens first. */
/* ---- Opening splash -----------------------------------------------------------------
   Kairi draws itself → kolam dots → marigold heart lights → name rises →
   zooms into the heart and fades, revealing the page. First visit per session only. */
.splash { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--brand-ivory); transition: opacity 420ms ease 160ms; }
.no-splash .splash { display: none; }
.splash-inner { display: grid; justify-items: center; text-align: center; }
.splash-mark { width: 104px; height: 104px; overflow: visible; transform-origin: 54.7% 59.4%; transition: transform 620ms cubic-bezier(.6, 0, .4, 1), opacity 420ms ease 200ms; }
.sp-lines path { fill: none; stroke: var(--brand-green); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; }
.sp-l1 { animation: sp-draw 900ms cubic-bezier(.45, .05, .3, 1) 150ms forwards; }
.sp-l2 { animation: sp-draw 360ms ease-out 820ms forwards; }
.sp-l3 { animation: sp-draw 360ms ease-out 940ms forwards; }
.sp-dots circle { fill: var(--brand-gold); transform-box: fill-box; transform-origin: center; transform: scale(0); animation: sp-pop 320ms cubic-bezier(.3, 1.6, .5, 1) forwards; }
.sp-dots circle:nth-child(1) { animation-delay: 1000ms; } .sp-dots circle:nth-child(2) { animation-delay: 1080ms; } .sp-dots circle:nth-child(3) { animation-delay: 1160ms; }
.sp-heart { fill: var(--brand-marigold); transform-box: fill-box; transform-origin: center; transform: scale(0); animation: sp-pop 420ms cubic-bezier(.3, 1.6, .5, 1) 1200ms forwards; }
.sp-glow { fill: var(--brand-marigold); opacity: 0; transform-box: fill-box; transform-origin: center; animation: sp-glow 1200ms ease-out 1300ms forwards; }
.splash-name { height: 30px; margin-top: var(--space-4); font-family: var(--font-serif); font-size: var(--size-24); line-height: 30px; letter-spacing: -0.01em; color: var(--color-text); opacity: 0; animation: sp-rise 600ms var(--ease-standard) 700ms forwards; }
.splash-tag { height: 14px; margin-top: 6px; font-size: var(--size-11); line-height: 14px; font-weight: var(--weight-semibold); letter-spacing: .4em; text-transform: uppercase; color: var(--color-text-muted); opacity: 0; animation: sp-rise 600ms var(--ease-standard) 860ms forwards; }
@keyframes sp-draw { 0% { stroke-dashoffset: 1; opacity: 0; } 3% { opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 1; } }
@keyframes sp-pop  { to { transform: scale(1); } }
@keyframes sp-glow { 0% { opacity: 0; transform: scale(.6); } 40% { opacity: .28; } 100% { opacity: .16; transform: scale(1); } }
@keyframes sp-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.splash.is-leaving { opacity: 0; pointer-events: none; }
/* maker's line at the foot of the splash: quiet and still from the first frame, so the eye
   stays on the mark as it draws. Drawn as outlines (Source Sans 3, 12px) so it looks the same
   before any font loads and matches the launch screens pixel for pixel. */
.splash-by { position: absolute; left: 0; right: 0; bottom: max(28px, calc(16px + env(safe-area-inset-bottom))); display: block; margin: 0 auto; }
.splash-by .by-1 { fill: var(--color-text-faint); }
.splash-by .by-2 { fill: var(--color-text-muted); }
.splash.is-leaving .splash-mark { transform: scale(9); opacity: 0; }
.splash.is-leaving .splash-name, .splash.is-leaving .splash-tag, .splash.is-leaving .splash-by { opacity: 0 !important; transition: opacity 200ms; animation: none; }
/* launched from the Home Screen: the launch screen is ivory with only the byline (public/splash/v3/*.png), so the
   splash keeps its light colours in every mode, even when the phone is dark (the page after it follows the mode).
   The mark, name and tag then draw in exactly as in Safari. */
.splash:is(.splash-ivory *, .keep-ivory) { --brand-ivory: #fbf7ef; --brand-green: #23493a; --color-text: var(--stone-900); --color-text-muted: var(--stone-500); --color-text-faint: var(--stone-400); }
@media (prefers-reduced-motion: reduce) {
  .sp-lines path { stroke-dashoffset: 0; opacity: 1; } .sp-dots circle, .sp-heart { transform: none; } .sp-glow { opacity: .16; }
  .splash-name, .splash-tag { opacity: 1; }
}
