/* ============================================================
   My Boat Owner — Splash + Brand Tokens
   Drop-in, framework-free.

   Pairs with splash.js. Served as a static asset so it loads
   before the Vite bundle parses.
   ============================================================ */

/* ——— Splash root ——————————————————————————————————————————————
   Fixed full-viewport. Sits above app shell during boot. JS
   adds .is-hiding to start the fade, then removes the element. */
.mbo-splash {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-family: 'Roboto', system-ui, -apple-system, sans-serif;
  color: var(--brand-ink);
  background-color: var(--brand-base);
  background-image:
    radial-gradient(60% 45% at 20% 10%,
      color-mix(in srgb, var(--brand-accent) 28%, transparent) 0%,
      transparent 55%),
    radial-gradient(50% 40% at 80% 15%,
      color-mix(in srgb, var(--brand-mid) 34%, transparent) 0%,
      transparent 60%),
    radial-gradient(70% 55% at 50% 80%,
      color-mix(in srgb, var(--brand-mid) 28%, transparent) 0%,
      transparent 60%),
    linear-gradient(120deg,
      color-mix(in srgb, var(--brand-mid) 28%, transparent),
      color-mix(in srgb, var(--brand-accent) 22%, transparent),
      color-mix(in srgb, var(--brand-mid) 28%, transparent));
  overflow: hidden;
  transition: opacity 250ms ease-out;
}
.mbo-splash.is-hiding { opacity: 0; pointer-events: none; }

/* ——— Logo block ————————————————————————————————————————————— */
.mbo-splash__logo {
  position: absolute; left: 0; right: 0; top: 38%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 24px;
}
.mbo-splash__logo img,
.mbo-splash__logo svg { width: 180px; height: auto; max-height: 140px; }

/* Tenants whose logo is a dark mark on a light background can opt into
   the cream-disc treatment (see Tooley's). Apply class `logo--badge`. */
.mbo-splash__logo.logo--badge img {
  width: 140px; height: 140px; border-radius: 50%;
  background: var(--brand-ink);
  padding: 12%;
  object-fit: contain;
  box-shadow:
    0 0 0 3px var(--brand-accent),
    0 0 0 6px color-mix(in srgb, var(--brand-accent) 25%, transparent),
    0 10px 28px rgba(0,0,0,0.4);
}

.mbo-splash__tagline {
  text-align: center;
  font-size: 13px; font-weight: 500; letter-spacing: 0.18em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--brand-ink) 78%, transparent);
}

/* ——— Progress ring ————————————————————————————————————————— */
.mbo-splash__ring {
  position: absolute; left: 0; right: 0; bottom: 132px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.mbo-splash__ring-wrap {
  position: relative; width: 64px; height: 64px;
}
.mbo-splash__ring-wrap svg { width: 64px; height: 64px; }
.mbo-splash__ring-track { fill: none; stroke: color-mix(in srgb, var(--brand-ink) 15%, transparent); stroke-width: 3; }
.mbo-splash__ring-fill  {
  fill: none; stroke: var(--brand-accent); stroke-width: 3;
  stroke-linecap: round;
  transform: rotate(-90deg); transform-origin: 32px 32px;
  transition: stroke-dasharray 200ms ease-out;
  animation: mbo-ring-spin 1.6s linear infinite;
}
@keyframes mbo-ring-spin {
  from { transform: rotate(-90deg); transform-origin: 32px 32px; }
  to   { transform: rotate(270deg); transform-origin: 32px 32px; }
}
.mbo-splash__ring-pct {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 14px; font-weight: 600; letter-spacing: -0.02em;
  color: var(--brand-ink);
}
.mbo-splash__status {
  font-size: 12px; letter-spacing: 0.05em;
  color: color-mix(in srgb, var(--brand-ink) 72%, transparent);
}

/* ——— Footer —————————————————————————————————————————————————— */
.mbo-splash__footer {
  position: absolute; left: 0; right: 0; bottom: 32px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: color-mix(in srgb, var(--brand-ink) 60%, transparent);
  font-size: 11px; letter-spacing: 0.04em;
}
.mbo-splash__powered { display: flex; align-items: center; gap: 6px; }
.mbo-splash__powered strong {
  font-weight: 600; letter-spacing: 0.08em;
  color: color-mix(in srgb, var(--brand-ink) 85%, transparent);
}
.mbo-splash__version {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 10px; opacity: 0.6;
}

/* ——— Reduced motion ————————————————————————————————————————— */
@media (prefers-reduced-motion: reduce) {
  .mbo-splash__ring-fill { animation: none; }
  .mbo-splash { transition: none; }
}
