/* The brand splash (D-104): the app's one loading screen, the same as the Audit tracker's (SIRE Tracker release/go-live,
   public/splash.css + src/components/landing-splash.jsx). index.html draws it before any script runs; components/ui/Loader.tsx
   keeps it while the session, the vessels and the first screen load (components/BootGate.tsx, D-107). The large bird sharpens
   into place, the small one glides in beside it, the name settles from wide tracking, a thin light sweeps beneath. A splash that follows another continues it (no second
   intro); the last one leaves a copy (.is-ghost) that rises and blurs away over the page. A same-origin file because the
   production CSP (public/_headers) is style-src 'self'. */
.ih-splash { position: fixed; inset: 0; z-index: 2147483000; display: grid; place-items: center; background: #ffffff; color: #0c1b33;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
html.dark .ih-splash { background: #0d1219; color: #e8eef6; }
.ih-splash__in { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.ih-splash__mark { display: block; width: 96px; height: auto; overflow: visible; }
.ih-splash__big { transform-box: fill-box; transform-origin: 50% 70%; animation: ih-sp-big .9s cubic-bezier(.22, 1, .36, 1) both; }
.ih-splash__small { transform-box: fill-box; transform-origin: 50% 50%; animation: ih-sp-fly 1.1s .22s cubic-bezier(.22, 1, .36, 1) both; }
.ih-splash__name { font-size: 19px; line-height: 1; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; animation: ih-sp-name 1s .32s cubic-bezier(.22, 1, .36, 1) both; }
.ih-splash__line { position: relative; width: 132px; height: 2px; border-radius: 2px; overflow: hidden; background: rgb(31 95 168 / 0.12);
  animation: ih-sp-fade .6s .5s both; }
html.dark .ih-splash__line { background: rgb(108 184 238 / 0.16); }
.ih-splash__line::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; border-radius: inherit;
  background: linear-gradient(90deg, rgb(56 173 230 / 0), #38ade6, #1f5fa8, rgb(31 95 168 / 0)); transform: translateX(-100%);
  animation: ih-sp-sweep 1.3s var(--ih-sweep-delay, .6s) cubic-bezier(.65, 0, .35, 1) infinite; } /* a splash that takes over sets the delay: same phase */
@keyframes ih-sp-big { from { opacity: 0; transform: translateY(8px) scale(.94); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes ih-sp-fly { from { opacity: 0; transform: translate(-30px, 16px) rotate(-10deg) scale(.8); } to { opacity: 1; transform: none; } }
@keyframes ih-sp-name { from { opacity: 0; letter-spacing: .32em; filter: blur(4px); } to { opacity: 1; letter-spacing: -.01em; filter: none; } }
@keyframes ih-sp-fade { from { opacity: 0; } }
@keyframes ih-sp-sweep { to { transform: translateX(250%); } }

.ih-splash__msg { margin-top: 2px; font-size: 13px; color: #64748b; animation: ih-sp-fade .6s .6s both; }
html.dark .ih-splash__msg { color: #8f9bab; }

/* The app took over from an earlier splash: no second intro. */
.ih-splash.is-continued :is(.ih-splash__big, .ih-splash__small, .ih-splash__name, .ih-splash__line) { animation: none; }
.ih-splash.is-continued .ih-splash__msg { animation: ih-sp-fade .4s both; }
.ih-splash.is-same-message .ih-splash__msg { animation: none; }

/* A removed splash's exit copy: a short rise and blur over the page beneath. */
.ih-splash.is-ghost { pointer-events: none; z-index: 2147483001; }
.ih-splash.is-leaving { pointer-events: none; animation: ih-sp-out .6s cubic-bezier(.4, 0, .2, 1) both; }
.ih-splash.is-leaving .ih-splash__in { animation: ih-sp-in-out .6s cubic-bezier(.4, 0, .2, 1) both; }
@keyframes ih-sp-out { to { opacity: 0; } }
@keyframes ih-sp-in-out { to { transform: translateY(-12px) scale(.97); filter: blur(6px); } }

/* Into the sign-in page (D-107): the mark and the name fly into its brand (script), the ground and the rest dissolve. */
.ih-splash.is-handoff { animation: ih-sp-reveal .62s .12s cubic-bezier(.4, 0, .2, 1) both; }
.ih-splash.is-handoff :is(.ih-splash__line, .ih-splash__msg) { animation: ih-sp-drop .32s cubic-bezier(.4, 0, .2, 1) both; }
@keyframes ih-sp-reveal { to { background-color: transparent; } }
@keyframes ih-sp-drop { to { opacity: 0; transform: translateY(6px); filter: blur(4px); } }
/* The page's brand waits at its final place (no entrance of its own) while the splash's flies into it, and keeps it. */
html.ih-handoff .ih-brand { animation: none !important; opacity: 0; }
html.ih-handed .ih-brand { animation: none !important; }

@media (prefers-reduced-motion: reduce) {
  .ih-splash, .ih-splash *, .ih-splash__line::after { animation: none !important; }
  .ih-splash__line { display: none; }
}
