/* Mira splash (_MiraSplashN10, n10 home only), the parts that can wait: words under her face,
   fallbacks and the hand-off. The first frame, the edges, the scroll lock and the 7 s safety fade are
   inline in the page head (_MiraSplashHeadN10), so they paint before any stylesheet. */
#mira-splash { --ms-css: 1; } /* mira-splash.js shows the words only once this file is in */

/* ---------- words: star, МИРА, role, hello (low on the screen, never over her face) ---------- */
#mira-splash .ms-brand {
  left: 0; right: 0; top: 0; height: 100vh; height: 100svh; /* the visible part, above iOS bars */
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding: 0 16px calc(28px + env(safe-area-inset-bottom));
  padding: 0 max(16px, env(safe-area-inset-right)) calc(max(24px, 4.5svh) + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  /* right under her shoulders (the picture melts out at ~60% of its height), not at the very bottom */
  padding-top: 58vh; padding-top: 58svh;
  text-align: center; color: #f3ede4; pointer-events: none;
}
#mira-splash.ms-go .ms-brand { visibility: visible; }
#mira-splash .ms-brand > * { display: block; margin: 0; }

#mira-splash .ms-star { position: relative; width: 22px; height: 22px; margin-bottom: 12px; }
#mira-splash .ms-star svg { position: relative; display: block; width: 100%; height: 100%; filter: drop-shadow(0 0 8px rgba(243, 217, 155, .7)); }
#mira-splash .ms-flare { position: absolute; left: 50%; top: 50%; width: 130px; height: 130px; margin: -65px 0 0 -65px; opacity: 0;
  background: radial-gradient(closest-side, rgba(255, 236, 190, .5), rgba(229, 196, 126, .12) 45%, transparent 72%); }
#mira-splash .ms-flare::before, #mira-splash .ms-flare::after { content: ""; position: absolute; left: 0; top: 50%; width: 100%; height: 1px; margin-top: -.5px;
  background: linear-gradient(90deg, transparent, rgba(255, 240, 205, .95), transparent); }
#mira-splash .ms-flare::after { transform: rotate(90deg) scaleX(.55); }

#mira-splash .ms-name { font: 400 clamp(38px, 12vw, 60px)/1 "Forum", Georgia, serif; text-transform: uppercase; white-space: nowrap;
  filter: drop-shadow(0 2px 16px rgba(229, 196, 126, .32)); }
@supports (height: 1svh) { #mira-splash .ms-name { font-size: clamp(34px, min(12vw, 7svh), 60px); } }
#mira-splash .ms-name b { display: inline-block; font-weight: 400; padding: .06em 0;
  background: linear-gradient(180deg, #faf5ec 0%, #f3ede4 44%, #e9cf94 78%, #e5c47e 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
#mira-splash .ms-name b + b { margin-left: .42em; } /* wide tracking, still centred */
#mira-splash .ms-role { margin-top: .5em; font: italic 500 clamp(17px, 5vw, 21px)/1.2 "Cormorant Garamond", Georgia, serif; color: #f6e7c4; letter-spacing: .01em; }
#mira-splash .ms-hello { display: flex; align-items: center; gap: 10px; margin-top: 14px; font: 500 12.5px/1.3 "Manrope", system-ui, sans-serif; letter-spacing: .05em; color: rgba(243, 237, 228, .74); }
#mira-splash .ms-hello::before, #mira-splash .ms-hello::after { content: ""; width: 18px; height: 1px; background: linear-gradient(90deg, transparent, #e5c47e); }
#mira-splash .ms-hello::after { transform: scaleX(-1); }
/* fonts were late: stay on system faces, so nothing swaps mid-animation */
#mira-splash.ms-nofont .ms-name, #mira-splash.ms-nofont .ms-role { font-family: Georgia, "Times New Roman", serif; }
#mira-splash.ms-nofont .ms-hello { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
@media (max-height: 520px) { #mira-splash .ms-role, #mira-splash .ms-hello { display: none; } #mira-splash .ms-star { margin-bottom: 8px; } }

/* timeline from the moment the words start (~0.9 s): glint, letters, role, hello in and out */
#mira-splash.ms-go .ms-star svg { animation: ms-glint 1s cubic-bezier(.2, .8, .2, 1) both; }
#mira-splash.ms-go .ms-flare { animation: ms-flare 1.2s ease-out .12s both; }
#mira-splash.ms-go .ms-name b { animation: ms-letter .8s cubic-bezier(.2, .8, .2, 1) calc(.35s + var(--i) * .13s) both; }
#mira-splash.ms-go .ms-role { animation: ms-rise .9s ease 1.25s both; }
#mira-splash.ms-go .ms-hello { animation: ms-hello 2.2s ease 1.9s both; }
@keyframes ms-glint { 0% { opacity: 0; transform: scale(.2) rotate(-90deg); } 55% { opacity: 1; transform: scale(1.35) rotate(8deg); } 100% { opacity: 1; transform: none; } }
@keyframes ms-flare { 0% { opacity: 0; transform: scale(.3); } 35% { opacity: 1; } 100% { opacity: 0; transform: scale(1.5); } }
@keyframes ms-letter { from { opacity: 0; transform: translateY(.22em); filter: blur(8px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes ms-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ms-hello { 0% { opacity: 0; transform: translateY(6px); } 30%, 72% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* ---------- no video and no frames: the photo slowly comes closer ---------- */
#mira-splash.ms-push .ms-still { transform-origin: 50% 30%; animation: ms-push 6s cubic-bezier(.25, .6, .3, 1) both; }
@keyframes ms-push { from { transform: scale(1); } to { transform: scale(1.08); } }

/* ---------- hand-off (mira-splash.js animates the frame) ---------- */
#mira-splash.ms-out { cursor: default; }
#mira-splash.ms-out .ms-frame, #mira-splash.ms-out .ms-media { will-change: transform; }
#mira-splash.ms-out .ms-brand { opacity: 0; transform: translateY(10px); transition: opacity .22s ease, transform .35s ease; }

/* reduced motion: words just stand there (the page then fades in) */
@media (prefers-reduced-motion: reduce) {
  #mira-splash .ms-brand *, #mira-splash .ms-brand *::before, #mira-splash .ms-brand *::after, #mira-splash .ms-still { animation: none !important; }
}

